Question: Create a matlab code, using ode 4 5 , that simulates a bouncing ball. Using the following: m = 1 0 kg g = 9
Create a matlab code, using ode that simulates a bouncing ball.
Using the following:
mkg
g
p
Cd
Area of the ball
Initial V
Inital Angle
emotion of the ball are as follows:
Create two empty figures in MATLAB using figure command. Each figure would correspond to position and velocity plots respectively.
Implement the ode solver to solve the differential equations for ball's projectile motion, until the ball hits the ground. You will have to set up an event based ode termination similar to what was discussed in the lecture.
Generate a plot of the ball's position and velocity in their respective figures. Don't forget to make the axes have the same scaling.
Update the initial time and initial conditions for the projectile motion after the impact with the ground using the equations given below,
where, is known as the coefficient of restitution COR which relate the preimpact and postimpact velocities. You will use COR of for this problem.
Go back to step and repeat the process until
I NEED HELP CREATING THE CODE PLEASE. Thank you
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
