Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please complete this question using Matlab. Homework Problem 3: Numeric Arrays In this problem, you will simulate the throwing of a ball into the air.
Please complete this question using Matlab.
Homework Problem 3: Numeric Arrays In this problem, you will simulate the throwing of a ball into the air. The ball's motion can be described as follows: where the acceleration due to gravity g -9.8 m/s2. Set the magnitude of the initial velocity VO to be 10 m/s with an angle of 20. (See figure) 1. Create an array called Time containing 1001 equally spaced elements ranging from 0 to 0.6 seconds. 2. Calculate the initial x-direction velocity "ro and assign that to the scalar variable xVel. Vo=10 m/s 20 xD 3. Calculate the initial y-direction velocity vyo and assign that to the scalar variable yVel. 4. Create an array xDistance to describe the x-direction displacement of the ball. 5. Create an array yDistance to describe the y-direction displacement of the ball. 6. Extract the maximum height reached by the ball and save the value in a variable called MaxHeight. 7. Plot the height of the ball as a function of time using the plot(x,y) command. Label the x-axis as Time" and the y-axis as "Height
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