Info

此问题已关闭。 请重新打开它进行编辑或回答。

Help in solving Differential Equations

1 次查看(过去 30 天)
Bok
Bok 2013-4-12
关闭: MATLAB Answer Bot 2021-8-20
Hi I have a few differential equations of the following form.. Is there anyone that can enlighten me in solving them in beginners terms? Thanks a lot.
A simplified example is as follow:
y(1)' = y(1) + y(2)'
y(2)' = y(1)' + y(2)' + y(3)'
y(3)' = y(3) + y(2) + 3*y(1)'
Thanks, this is just a simplified version and I don't think I could modify the equations such that all the y' are on one side :(
Thanks again1

回答(1 个)

Sathish Kumar
Sathish Kumar 2013-4-12
The set od equations you are trying to solve COUPLED set of ODEs. It is actually very easy to do in matlab using ODE45. You need the initial conditions of all the y's in your equation. I believe you know some linear algebra. Take Y=[y1 y2 y3] as the vector you want to find. Let Y0=[y10 y20 y30] be the IC(you should put the values of y10 y20 y30). Define the range of independant variable for which you need the solution. x=xmin:xmax; call [xout,Yout]=ode45(@yourfxn,x,Y0); xout is the range of independant variable numerically used. First column of Y is y1 and so on; define yourfxn as a function. function Y'=yourfxn(x,Y); define what is your function doing. Y'=AY, where A is the coeffienct matrix.
Hope this helps!!!! Lot of solutions and examples can be found online for this

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by