Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use matlab to answer this questiion. Please follow all the steps and make sure the figure shows up as shown below. Make sure that you
Use matlab to answer this questiion. Please follow all the steps and make sure the figure shows up as shown below. Make sure that you plot the ground as a dotted line, Please comment as you write the code and show the ouput
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) Initial height of ball at release 1.5 m ii. Gravitational acceleration- 9.8m/s2 iii. Velocity of ball at release - 4 m/s 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, inclusive 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 ). Solve for x and y i x(t) u cos(8180)t . We multiply by 1-0 to convert degrees to radians 180 e. Approximate when the ball hits the ground. i. Find the index when the height first becomes negative (use find) ii. The distance at which the ball hits the ground is value of x at that index
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started