Question: The height h ( m ) and speed v ( m s ) of a thrown ball can be calculated with the following equations: h
The height and speed of a thrown ball can be calculated with the following equations:
where is the initial velocity
is the time seconds
is initial angle of the ball relative to the ground degrees
is the acceleration due to gravity
Write a function to complete the following tasks:
a Define input arguments for and and are scalar values. The vector should contain values between seconds and seconds. You can choose the number of values in the vector pick at least values
b For ALL time values, calculate the height and speed of the thrown ball given the equations above. and should be vectors that are the same size as the vector that you define. HINT: is defined to be an angle in degrees. What is the builtin MATLAB function to calculate the sine of an angle in degrees?
c Output the height and speed 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.
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
