Looking to animate two lines with the angle between them changing?
18 views (last 30 days)
Have an EMG signal which I've used to get a range of corresponding angles. would like to have 2 lines representing an arm where the angle I have is between them. From there i would like to animate the whole process with all angles. Cannot figure out how to do this?
Andrew Reibold on 25 Nov 2014
Edited: Andrew Reibold on 25 Nov 2014
Bro, If you are working with EMG signals you should really know how to do Highschool trig... haha :-)
But anyway, here is an example of how you could do it using Unit Circle concepts and a line of length 1! Replace angles with your angles in degrees - This one animates from 30-90. (If your angles are in Radians use sin and cos instead of sind and cosd )
for angles= [30:90];
x = cosd(angles);
y = sind(angles);
axis([-1.5 1.5 -1.5 1.5])