project1 - p % Process v_i_x = vel_init*cos(angle*pi/180);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% The process part of Project 1 in Matlab % Lacking proper process documentation % % Constant GRAVITY = -9.8; % accel due to gravity, m/s G % Define inputs vel_init = 20; % initial velocity, m/s angle = 53; % initial angle, radians dist_x = 36; % horizontal distance to post, m post_height = 3.05; % height to bottom of post, m
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p % Process v_i_x = vel_init*cos(angle*pi/180); v_i_y = vel_init*sin(angle*pi/180); time = dist_x / v_i_x dist_y = v_i_x*time + 0.5*GRAVITY*time^2; v_f_x = v_i_x; v_f_y = v_i_y + GRAVITY*time; vel_final = (v_f_x^2 + v_f_y^2)^0.5 angle_final = atan(v_f_y/v_f_x) * (180/pi)...
View Full Document

Ask a homework question - tutors are online