The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: solving a set of odes and non-odes system
Replies: 6   Last Post: Apr 4, 2014 7:22 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 1,717
Registered: 11/8/10
Re: solving a set of odes and non-odes system
Posted: Feb 26, 2013 2:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 25 Feb., 20:20, "Elsis " <> wrote:
> Hello!
> I have a set of equations, all coupled but some of them are odes and the others are not differential... meaning: half of my equations are odes and the other half are simple equations with variables but... all of them are coupled, the odes and non-odes have to be all solved at the same time... how could I do this? I am a matlab beginner and I have no idea about how to proceed.
> Thank you very much! :)
> Elsa

The easiest way to proceed is to use an ODE-integrator (like ODE15s)
to solve for the differential variables and to deduce the algebraic
variables "internally".
dy1/dt = 3*sin(y1)+5*cos(y2)
Here you could simply solve for y1 and deduce y2 explicitly as
If the non-differential equations are not that simple, you will have
to solve for both differential and non-differential equations using
The solver offers the possibility to define a mass matrix M in which
you set the rows in M to zero that correspond to algebraic variables.
For the example above,
M=[1 0 ; 0 0];

Best wishes

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.