- 2

- 0

## Main Question or Discussion Point

**2-Animated graphs on one figure HELP!!!**

I want to plot 2 animated graphs on the same figure (y=sin(x) and y=cos(x)). I wrote this code

x=linspace(0,10,10000);

y1=sin(x);

y2=cos(x);

comet(x,y1);

hold on

comet

hold off

I want that the "comet head" of those two function start at the same time but in the above code i wrote, Only after matlab finish my first graph, will it start to plot the second graph. So, can anybody help me to plot those 2 animated graphs starting at the same time on the same figure.

Thank you very much.

My email : nguyentiennhat85@yahoo.com