I am working on a project which involves actuation of a part that has to move sinusoidaly. Suppose, I have to continuously move my servo to and fro between two positions such that the rpm is not fixed through out the cycle, rather it has to vary according to different mathematical functions like a sine function.

Is it possible to actuate Dynamixel 12A in similar fashion using MATLAB only?

Any help would be great