Multi-mass, damper, spring system in matlab

3 visualizaciones (últimos 30 días)
Kay
Kay el 13 de Abr. de 2017
Respondida: Sam McDonald el 19 de Abr. de 2017
I am looking to solve a multi-mass, damper, and spring system in matlab.
Eq1 = mx1'' + 2cx1' + -cx2' + 3kx1 - kx2 = 0 Eq2 = mx2'' - cx1' + 3x2' - kx1 + 2kx2 = 0
x1(0)=0; x2(0)=0.3; x1'(0)=-0.1,x2'(0)=0
How do I solve for the equations of motion (x1 and x2) in matlab? I believe I should be using ode45, but am not sure how.

Respuestas (1)

Sam McDonald
Sam McDonald el 19 de Abr. de 2017
A solver like "ode45" would be the correct choice for a problem like this. It takes a function handle as its first argument of the form y' = f(t,y). You will need to convert your equations to this form, where x1 and x2 are two of the four states in y. Your function will return y', which are the derivatives of the states, expressed in terms of the other states.
Looking at the ode45 examples is a good place to start:

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by