Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Help in solving Differential Equations

1 visualizzazione (ultimi 30 giorni)
Bok
Bok il 12 Apr 2013
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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

Risposte (1)

Sathish Kumar
Sathish Kumar il 12 Apr 2013
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

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by