Inspired by biological swimmers such as fish, a robot composed of a rigid head, a compliant body and a rigid caudal fin was built. It has the geometrical properties of a subcarangiform swimmer of the same size. The head houses a servo-motor which actuates the compliant body and the caudal fin. It achieves this by applying a concentrated moment on a point near the compliant body base. In this paper, the dynamics of the compliant body driving the robotic fish is modelled and experimentally validated. Lighthill's elongated body theory is used to define the hydrodynamic forces on the compliant part and Rayleigh proportional damping is used to model damping. Based on the assumed modes method, an energetic approach is used to write the equations of motion of the compliant body and to compute the relationship between the applied moment and the resulting lateral deflections. Experiments on the compliant body were carried out to validate the model predictions. The results showed that a good match was achieved between the measured and predicted deformations. A discussion of the swimming motions between the real fish and the robot is presented.