Question: Matlab: Write a script program that ask user to provide an initial velocity, angles ( can be a vector ) , initial position [ x
Matlab:
Write a script program that ask user to provide an initial velocity, angles can be a vector initial position x y Then calculate the max x and y distances to the corresponding angle. At last, plot the max x and max y corresponding to the angles
detail:
request an initial velocity v
request the angles in a vector form
request initial position
based on the angle calculate the time that it will reach to the max height and max distance
xmaxang and ymaxangms xxvcos ang t
yyvsin ang tgt
vyvsin ang gt
Repeat all angles given till all results calculated.
Print the results like this:
Initial velocity: ms
Initial position:
Angle degrees, max horizontal distance mmax height m
Angle degrees, max horizontal distance mmax height m
plot max horizontal distance vs angle, and max height vs angle.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
