This paper presents a novel actuation mechanism to enable the span-wise undulating motion of the caudal fin of a robotic fish. To minimize the mechanical components such as cams, pulleys and gears, a flexible joint-based wave machine mechanism is adopted to generate the waving motion of the caudal fin. In particular, the proposed mechanism has the advantages of minimum total weight and few mechanical components because of its simplicity. Through analysis and experiments, the efficacy of the proposed mechanism is validated.