% % 2 Harmonic oscillators classically % Plotting the spiral % tim=0:0.2:10*pi; a0=1; x1=a0*cos(tim); x2=a0*cos(tim-pi/2); fig1=figure(1);set(fig1,'color','white'); plot(tim,x1); title('Particle 1: plot of x1') xlabel('time') ylabel('x1') fig2=figure(2);set(fig2,'color','white'); plot(tim,x2); title('Particle 2: plot of x2') xlabel('time') ylabel('x2') fig3=figure(3);set(fig3,'color','white'); plot3(tim,x1,x2); title('Particles 1 and 2 plot of (x1,x2) ') xlabel('time') ylabel('x1') zlabel('x2')