Lubnow_Brian_HW_11

# Lubnow_Brian_HW_11 - 12R-CF ENGE1114-HW 11 Lubnow Brian 1/8...

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

12R-CF 11/7/2011 ENGE1114-HW 11 Lubnow, Brian 1/8 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

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

View Full Document
11/7/2011 ENGE1114-HW 11 Lubnow, Brian 2/8 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 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 2.58 0.40 3.00 2.62 0.45 3.37 2.59 0.50 3.75 2.47 0.55 4.13 2.28 0.60 4.50 2.00 0.65 4.88 1.65 0.70 5.25 1.21 0.75 5.62
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 / 8

Lubnow_Brian_HW_11 - 12R-CF ENGE1114-HW 11 Lubnow Brian 1/8...

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

View Full Document
Ask a homework question - tutors are online