clear all n=120; endtime=365.25; M = moviein(n); for j=1:n t=(j-1)/(n-1)*endtime; xm = -11.9084 + 57.9117 * cos(2*pi*t/87.97); ym = 56.6741 * sin(2*pi*t/87.97); xe = -2.4987 + 149.6041 * cos(2*pi*t/365.25); ye = 149.5832 * sin(2*pi*t/365.25); plot([xm xe],[ym ye],'bo',[xm xe],[ym ye],'y-'); axis([-200 200 -200 200]); M(:,j) = getframe; end movie(M)