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 [x0 y0]. 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 v0
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
xmax(ang) and ymax(ang)(m)/(s) x=x0+v0cos( ang )t
y=y0+v0sin( ang )t-(1)/(2)gt^(2)
vy=v0sin( ang )-gt
Repeat all angles given till all results calculated.
Print the results like this:
Initial velocity: 10.34(m)/(s)
Initial position: [2.004.50]
Angle 30 degrees, max horizontal distance =13.56m,max height =8.71m
Angle 32 degrees, max horizontal distance =14.66m,max height =9.71m
plot max horizontal distance v.s. angle, and max height v.s. angle.
Matlab: Write a script program that ask user to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!