%Window for entering initial conditions prompt = {'Velocity v0 (m/sec)', 'Height h (m)', %Initial release height 'Simulation time (s)'}; title = 'Input Shotput Initial Conditions'; lines = [1,2,1]; def = {'15','2','3'}; %preselected values IC = inputdlg(prompt,title,lines,def); x0 = zeros(1,9); v0=str2num(IC{1}); %Assign input values to x0 vector h=str2num(IC{2}); tfinal=str2num(IC{3}); x=[0,1]; y=[0,1]; figure for i=1:30; pole=line([x(1),x(2)],[y(1),y(2)]);%drawing a line from x1,y1 to x2,y2 axis = [-1,1,-1,1]; rotate(pole,[0,0,1],i*5,[1,1,0]); %rotate(object,axis of rotation,degrees of rotation,point about which to rotate) ylabel(['Figure for V_0 = ',num2str(v0),' h = ',num2str(h),' and T_{final} = ',num2str(tfinal)]) xlabel('Normal^{superscript} Normal_{subscript}') G(i)=getframe cla end movie(G) timebegin=datestr(now)% useful command for knowing how long a simulation takes or when bugs occur depending on where you use it. timeend=datestr(now)