Question: This is my current code for Matlab. I am trying to figure out how to implement the LAST two lines which represents the velocity of

 This is my current code for Matlab. I am trying to

figure out how to implement the LAST two lines which represents the

This is my current code for Matlab. I am trying to figure out how to implement the LAST two lines which represents the velocity of the spring and the second line is the acceleration. I am trying to do an anonymous function to solve this second order Ordinary differential equation in ONE script. Can you help me with the code?

Connect a baseball to a massless spring with k-2.5 N/m and hang the mass vertically. The vertical coordinate y is 0 at the end of the massless spring before the baseball is put on it. (Can use F-ky for force on spring). Pull the baseball up to y 0.3m and drop it from rest. Use matlao's ode45 to track the motion of the baseball acted upon by the spring force, gravity, and air friction. Plot y(t) from t = 0 to 500. (USE AN ANONYMOUS FUNCTION TO PUT IT ALL IN ONE SCRIPT). Put the y-position of the bouncing ball near 500s in a comment line and why it has this value. Connect a baseball to a massless spring with k-2.5 N/m and hang the mass vertically. The vertical coordinate y is 0 at the end of the massless spring before the baseball is put on it. (Can use F-ky for force on spring). Pull the baseball up to y 0.3m and drop it from rest. Use matlao's ode45 to track the motion of the baseball acted upon by the spring force, gravity, and air friction. Plot y(t) from t = 0 to 500. (USE AN ANONYMOUS FUNCTION TO PUT IT ALL IN ONE SCRIPT). Put the y-position of the bouncing ball near 500s in a comment line and why it has this value

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