Mass spring system equation help

3 次查看(过去 30 天)
tyler brecht
tyler brecht 2014-10-22
编辑: Orion 2014-10-22
Hi all fellow Matlab users.
I'm fairly good a Matlab but I have encountered some difficulty in getting my function to work with ode45. I have a system with two springs and two masses which are attached to a wall. I am given two second order odes (x1'' = -((k1)*(x1 - L1))/m1 + ((k2)*(x2 - x1 - w1 - L2))/m1 & x2'' = -((k2)*(x2 - x1 - w1 - L2))/m2). There after I made the 2nd order odes into 4 1st order odes which would go into my function. The time span is from 0 - 20 and initial values of x1 = L1 and x2 = L1 + w1 + L2 + 6. Assume all the other variables to be = 1. L1 & L2 = free length of spring. m1 & m2 = masses. x1 & x2 = position of the masses. w1 & w2 = width of masses and k1 & k2 = stiffness of spring.
Any ideas on how i should approach this problem will be greatly appreciated.
Thank you

回答(1 个)

Orion
Orion 2014-10-22
编辑:Orion 2014-10-22
I think a question similar to this has been answered in this thread http://www.mathworks.com/matlabcentral/newsreader/view_thread/47243

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by