engr133_lab02_rsawran

pdf

School

Liberty University *

*We aren’t endorsed by this school

Course

133

Subject

English

Date

Apr 3, 2024

Type

pdf

Pages

2

Uploaded by UltraBook13697

Report
ENGR 133 - LAB 02 Authored by: Rowan Sawran Exersice #1 Problem Statement We are asked to preform some calculations for a projectile, given the equations for horizontal (x-direction) and vertical (y-direction) distance traveled as a function of initial velocity ( Vo ), launch angle ( A ) and time ( t )., We are given values for Vo and A , but x-distance, y-distance, and time are unknown. We want to know the maximum height of the projectile and the corresponding time to create a plot of the entire fligt of the projectile. The equations that applies are: Problem Solution Process (Psuedocode) Initialize Variables Calculate the total time of projectile fight calculate x(t) and y(t) positions during projectile flight Determine the maximum height of the projectile and the corresponding time Create a plot of the entire flight of the projectile Display flight information as formatted text Problem Solution Initialize Variables clear, clc, close all Vo = 50; % Initial Velocity, m/s A = 50; % Launch Angle, degrees g = 9.81; % Acceleration due to gravity, m/s^2 Calculate the total time of projectile flight t_hit = (2*Vo*sind(A))/g; % Calculating total projectile flight time, seconds Calculate x(t) and y(t) positions during projectile flight t = 0:0.01:t_hit; % Time array, seconds x_dist = (Vo*cosd(A))*t; % Horizontal distance traveled, meters y_dist = (Vo*sind(A))*t - 0.5*g*t.^2; % Vertical distance traveled, meters Determine the maximum height of the Projectile and the corresponding time [y_max, k] = max(y_dist); % Returns maximum vertical distance & index k 1
t_max = t(k); % Returns the kth value in the time array = time of max height Create a plot of the entire flight of the projectile plot(x_dist,y_dist), grid on % Create plot with grid title( 'Projectile flight, Vo =50 m/s, A=50 deg' ) % Add horiontal axis label xlabel( 'Horizontal Travel(x_dist)[m]' ) % Add horizontal axis label ylabel( 'Vertical Travel(y_dist)[m]' ) % Add vertical axis label Display flight information as formatted text fprintf( 'The maximum altitude of the projectile is: %.2f meters.\n\n' , y_max) The maximum altitude of the projectile is: 74.77 meters. fprintf( 'This occurs at %.2f seconds after launch. \n\n' , t_max) This occurs at 3.90 seconds after launch. fprintf( 'The total flight path is shown above. \n\n' ) The total flight path is shown above. 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help