I want the two points to run at the same time. But the point of the circle goes first in the animation, and then the point of the line goes after it is done. How can i make them start and finish at the same time?
r=5l=20f = @(t) plot(r*cos(t), r*sin(t), "ro", "MarkerFaceColor", "r", "MarkerSize", 16)fanimator(f,"AnimationRange", [0 6*pi])hold ong = @(t) plot(r*cos(t)+sqrt(l^2-r^2*sin(t)*.2),0, "ro", "MarkerFaceColor", "r", "MarkerSize", 16)fanimator(g,"AnimationRange", [15 25])hold offsyms tx = r*cos(t);y = r*sin(t);x1 = t;y1 = t-t;hold onfplot(x, y, [0,2*pi])title("Circulo")hold offhold onfplot(x1, y1, [15, 25])title("Linea Recta")hold off
Best Answer