ODE45/ODE15 inquiry about nonlinear spring

Is there anyone can help me on how to get an ODE45/ODE15 program to solve the above equation?
I want to get the value of y1 and y2.
Thanks,

 Respuesta aceptada

Star Strider
Star Strider el 25 de Nov. de 2021

0 votos

Since the system appears to describe a differential-algebraic equation, see the documentation section on Solve Differential Algebraic Equations (DAEs) that describes how to set it up symbolically in order to use ode15i to integrate it numerically.
.

2 comentarios

haohaoxuexi1
haohaoxuexi1 el 25 de Nov. de 2021
Can you provide me with an example with second order derivative?
Thanks,
Star Strider
Star Strider el 26 de Nov. de 2021
Use the odeToVectorField function. The documentation should provide all the necessary examples.

Iniciar sesión para comentar.

Más respuestas (1)

KSSV
KSSV el 25 de Nov. de 2021

0 votos

1 comentario

haohaoxuexi1
haohaoxuexi1 el 25 de Nov. de 2021
Editada: haohaoxuexi1 el 25 de Nov. de 2021
Would you mind to take a look at my equation?
I don't have the second order derivative term in equation#1.
And if possible, please tell me how to code it in ODE45/ODE15 to achieve my purpose?
In your example, you have theta and X, both of them have second order derivative term.
Thanks.

Iniciar sesión para comentar.

Productos

Versión

R2018b

Preguntada:

el 25 de Nov. de 2021

Editada:

el 30 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by