Question: Throwing a ball: a ) Create a new script file in MATLAB and save it as throwBall.m . b ) Add some comments to the

Throwing a ball:
a) Create a new script file in MATLAB and save it as throwBall.m.
b) Add some comments to the top of the file identifying who you are and what the script is designed to do.
c) Next, define some constants (you can pick your own variable names).
i. Initial height of ball at release =1.5m.
ii. Gravitational acceleration =9.8ms???2.
iii. Velocity of ball at release =4ms.
iv. Angle of the velocity vector at time of release =45 degrees.
c. Next, make a time vector that has 1000 linearly spaced values between 0 and 1.
3
d. If x is distance and y is height, the equations below describe their dependence on time and all the other parameters (initial height h, gravitational acceleration g, initial ball velocity v, angle of velocity vector in degrees . Enter the following equations into MATLAB.
i.x(t)=v**cos(**180)t
ii.y(t)=h+v*sin(**180)t-12*g**t2
e. Run the script file. Copy only the first and last values of x and y into your completed document.
 Throwing a ball: a) Create a new script file in MATLAB

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 Databases Questions!