%Script file to solve the single pendulum and animate the results: y0=[pi/3,0]; %Set initial conditions interval=[0,10]; m=500; Params=[9.8,1]; %Set parameters for gravity and length [t,y]=ImpEulerVec(@Pend1,interval,y0,500,Params); fprintf('Finished Processing. Going to Animation\n'); figure(1) plotyy(t,y(1,:),t,y(2,:)) title('Time plot of Position and Velocity'); figure(2) animPend(t,y);