Question: The height h ( m ) and speed v ( m s ) of a thrown ball can be calculated with the following equations: h

The height h(m) and speed v(ms) of a thrown ball can be calculated with the following equations:
h=v0tsin()-12gt2
v=v02-2V0gtsin()+g2t22
where v0 is the initial velocity (ms)
t is the time (seconds)
is initial angle of the ball relative to the ground (degrees)
g is the acceleration due to gravity (9.81ms2)
Write a function to complete the following tasks:
a) Define input arguments for v0,, and t.v0 and are scalar values. The vector t should contain values between 0 seconds and 2 seconds. You can choose the number of values in the vector (pick at least 100 values).
b) For ALL time values, calculate the height h and speed v of the thrown ball given the equations above. h and v should be vectors that are the same size as the t vector that you define. HINT: is defined to be an angle in degrees. What is the built-in MATLAB function to calculate the sine of an angle in degrees?
c) Output the height h and speed v using output arguments. HINT: An output argument is different from using the disp function. You should NOT use both in a function! Show the output arguments for BOTH test cases below in your diary file.
The height h ( m ) and speed v ( m s ) of a

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!