Question #96728

1. Throwing a ball. Below are all the steps you need to follow, but you should also add your own meaningful comments to the code as you write it.
a. Start a new file in the MATLAB Editor and save it as throwBall.m
b. At the top of the file, define some constants (you can pick your own variable names)
i. Initial height of ball at release = 1.5 m ii. Gravitational acceleration = 9.8 m/s2
iii. Velocity of ball at release = 4 m/s
iv. Angle of the velocity vector at time of release = 45 degrees

Expert's answer


Here is a code to define variables i, ii, iii, and iv. In Matlab you don't need to write words like "var" for the variable initialization.

Note, than the task formulation looks incomplete.


Initial_height = 1.5
Gravitational_acceleration = 9.8
Velocity_of_ball = 4
Angle = 45
LATEST TUTORIALS
APPROVED BY CLIENTS