(adsbygoogle = window.adsbygoogle || []).push({}); 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

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# 2-Animated graphs on one figure HELP

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Animated graphs figure | Date |
---|---|

Gambit graph | Dec 3, 2017 |

Mathematica: Animate multiple sets of XY data | Oct 11, 2015 |

Double Pendulum in C (Trace Motion Real-Time + gif output)? | Jun 14, 2015 |

XML Animation List Duration not working | Jul 21, 2014 |

Programming language or software for scientific/didactic animations | Jul 5, 2014 |

**Physics Forums - The Fusion of Science and Community**