Mass spring system equation help

1 回表示 (過去 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 Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by