I'm using 7.1 (R14) SP 3.
Is there any work around for this or to truncate the animation after the first run through?
Cheers,
Chris
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <goeiof$7j8$1@fred.mathworks.com>...
> "Chris " <chris.crawshaw@gmail.com> wrote in message <goehiv$lqb$1@fred.mathworks.com>...
> > Hi, I have just created my first animation, and for some reason it repeats three times. 1st at a medium speed, second very quickly and third quite slowly.
> > I can't find the part of my code which is causing this. Any help would be greatly appreciated.
> >
> > Cheers,
> > Chris
> > 
> > %code below
> > tfinal=3e6;
> > posvel0=[x;y;Vx;Vy]; %Hyperbolic fly by starting position
> > options=odeset('RelTol',1e8);
> > [t,posvel]=ode45('probeeqnsefb',[0, tfinal], posvel0, options);
> >
> > xe=RE*cos(q); %Earth
> > ye=RE*sin(q);
> > xm=rho0*cos(q); %Moons Orbit
> > ym=rho0*sin(q);
> >
> > for i=1:length(posvel);
> > pos=1:i;
> > if i==1
> > plot(posvel(pos,1),posvel(pos,2),xe,ye,xm,ym)
> > axis([16e8 5e8 11e8 10e8],'equal')
> > xlabel('Distance in xdirection (m)');
> > ylabel('Distance in ydirection (m)');
> > title('First Animation');
> > legend('Hyp Xfer','Earth','Moon''s Orbit',...
> > 'location','southwest');
> > hold on
> > else
> > plot(posvel(pos,1),posvel(pos,2))
> > hold on
> > end
> > m(i)=getframe;
> > end
> > movie(m,1)
>
> This repeat behavior in MOVIE exhibits in some older Matlab version. I believe it was corrected since.
>
> Bruno
