Lubnow_Brian_HW_11

Lubnow_Brian_HW_11 - 12R-CF 11/7/2011 ENGE1114-HW 11...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
12R-CF 11/7/2011 ENGE1114-HW 11 Lubnow, Brian PROBLEM STATEMENT: Prepare a Matlab program for an algorithm to analyze projectile motion DIAGRAM: SOLUTION: %Prepared by Brian Lubnow on 11/6/11 %Program designed to analyze the trajectory of a projectile clear; clc; g= 32.1740486; v=input( 'Enter the initial velocity in ft/sec: ' ); a=input( '\nEnter the launch angle in degrees: ' ); i=input( '\nEnter the desired time increment: ' ) fprintf( '\n\n Projectile position over time \n' ) fprintf( '________________________________________________________\n' ); fprintf( ' V0= %.2f ft/sec, Launch angle= %.2f deg\n' ,v,a); fprintf( '________________________________________________________\n' ); fprintf( ' Time (s) X(t) Y(t)\n' ); k1=v*sind(a); k2=k1/g; k=2*k2; for t=0:i:k x= v*cosd(a)*t; y1= v*sind(a)*t; t2=t^2; y2=.5*g*t2; y =y1-y2; fprintf( ' %5.2f %8.2f %8.2f\n' ,t,x,y); end xf= v*cosd(a)*k; fprintf( '\n The total time in the air= %.2f' ,k) fprintf( '\n The final x position of the projectile= %.2f' ,xf) RESULTS Enter the initial velocity in ft/sec: 15 Enter the launch angle in degrees: 60 Enter the desired time increment: .05 Projectile position over time ________________________________________________________ V0= 15.00 ft/sec, Launch angle= 60.00 deg ________________________________________________________ Time (s) X(t) Y(t) 0.00 0.00 0.00 0.05 0.38 0.61
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
12R-CF 11/7/2011 ENGE1114-HW 11 Lubnow, Brian 0.10 0.75 1.14 0.15 1.13 1.59 0.20 1.50 1.95 0.25 1.87 2.24 0.30 2.25 2.45 0.35 2.63
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/05/2011 for the course ENGE 1114 taught by Professor Twknott during the Fall '06 term at Virginia Tech.

Page1 / 7

Lubnow_Brian_HW_11 - 12R-CF 11/7/2011 ENGE1114-HW 11...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online