South American electric knifefish are a leading model system within neurobiology. Recent efforts have focused on understanding their biomechanics and relating this to their neural processing strategies. Knifefish swim by means of an undulatory fin that runs most of the length of their body, affixed to the belly. Propelling themselves with this fin enables them to keep their body relatively straight while swimming, enabling straightforward robotic implementation with a rigid hull. In this study, we examined the basic properties of undulatory swimming through use of a robot that was similar in some key respects to the knifefish. As we varied critical fin kinematic variables such as frequency, amplitude, and wavelength of sinusoidal traveling waves, we measured the force generated by the robot when it swam against a stationary sensor, and its velocity while swimming freely within a flow tunnel system. Our results show that there is an optimal operational region in the fin's kinematic parameter space. The optimal actuation parameters found for the robotic knifefish are similar to previously observed parameters for the black ghost knifefish, Apteronotus albifrons. Finally, we used our experimental results to show how the force generated by the robotic fin can be decomposed into thrust and drag terms. Our findings are useful for future bio-inspired underwater vehicles as well as for understanding the mechanics of knifefish swimming.