Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

2-Animated graphs on one figure HELP

  1. Apr 6, 2008 #1
    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
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: 2-Animated graphs on one figure HELP
  1. MATLAB 3D graphs help (Replies: 0)

Loading...