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 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