EngE_1114_HW7 - 1) Given: V 0, and Required: Flowchart,...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1) Given: V 0, and Required: Flowchart, MatLab code, sample run Relationships: g = 9.81 m/s 2 Solution: % This function will output a table of values for the x and y % positions of a projectile at time t. % Call statement: projectile_motion g = 9.81; a = input ( 'Enter the launch angle in degrees: ' ); v = input ( 'Enter the initial launch velocity: ' ); T = (2*v*sind(a))/g; fprintf ( ' TIME | x | y ' ); for t = 0:(T/20):T; x = (v*cosd(a)*t); y = (v*sind(a))*t-.5*(g)*(t^2); fprintf ( '\n %.2f | %.2f | %.2f\n' , t,x,y); end >> projectile_motion Enter the launch angle in degrees: 60 Enter the initial launch velocity: 15 TIME | x | y 0.00 | 0.00 | 0.00 0.13 | 0.99 | 1.63 0.26 | 1.99 | 3.10 0.40 | 2.98 | 4.39 0.53 | 3.97 | 5.50 0.66 | 4.97 | 6.45 0.79 | 5.96 | 7.22 0.93 | 6.95 | 7.83 1.06 | 7.95 | 8.26 1.19 | 8.94 | 8.51 1.32 | 9.93 | 8.60 1.46 | 10.92 | 8.51| 8....
View Full Document

Page1 / 4

EngE_1114_HW7 - 1) Given: V 0, and Required: Flowchart,...

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

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