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 ode45, that simulates a bouncing ball.
Using the following:
m=10kg
g=9.81
p=1.225
Cd=0.285
Area of the ball=0.0314
Initial V=202.22
Inital Angle =43
e=0.9motion of the ball are as follows:
mx=-FD*(x)v,my=-FD*(y)v-mg,FD=12v2CDA,v=x?2+y?22
x(0-)=0,y(0-)=0,x(0-)=v0*cos(),y(0-)=v0*sin()
Create two empty figures in MATLAB using figure() command. Each figure would correspond to position and velocity plots respectively.
Implement the ode45 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 ode45 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,
ti-=ti,x(ti-)=x(ti),y(ti-)=y(ti),x(ti-)=x(ti),y(ti-)=-e*y(ti)
where, e is known as the coefficient of restitution (COR) which relate the pre-impact and post-impact velocities. You will use COR of 0.9 for this problem.
Go back to step 3 and repeat the process until |(y)(ti-)|10-2.
I NEED HELP CREATING THE CODE PLEASE. Thank you
Create a matlab code, using ode 4 5 , that

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