how to solve differential equation when the derivative is in right and left side of the equation.

9 次查看(过去 30 天)
Hi guys,
I have a program that needs to solve a differential equation in it and I know that ode45 can solve it in matlab. But, the problem here is that some of our equations are like these:
dx(1) = -k_psi*x(1)+dx(23)
dx(12) = -dx(1)*x(12) + d1 + (1/m)*(sin(x(16))*cos(x(15))*K_T*f_t),....
because of the initial conditions that are not very simple, I cannot integrate it by hand and when I run the program, it says dx(23) is not defined yet. dx is the output of my function and x is input. I searched on web, though I couldnot find anything. Can anyone help?

采纳的回答

Torsten
Torsten 2019-7-2
编辑:Torsten 2019-7-2
MATLAB solves ODE systems of the form
A(t,x)*dx = f(t,x)
So put all dx terms on the left-hand side, determine the matrix A and use the MASS MATRIX option of the ODE integrators.

更多回答(0 个)

类别

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