ODE page

ODE15s Introduction and Tutorial


ODE15s is an ordinary differential equation subroutine found in MATLAB that is designed specifically to deal with stiff differential systems of equations.
Using ODE15s in MATLAB is similar to using ODE45. When using a system of differential equations such as these:

dy/dx(1) = Ax(1) +B
dy/dx(2) = Cx(2) +D

[Next] -- Back to ODE Page -- Back to Solve Page




Where A, B, C, and D are constant values and x(1), x(2) are a system of equations. They can be entered into a MATLAB M-file as:


function [out1,out2,out3] = fnx(t,x)
A = whatever;
B = whatever;
C = whatever;
D = whatever;
dy_dx(1,:) = A*x(1)+B;
dy_dx(2,:) = C*x(2)+D;
out1 = dy_dx;


[PREV] [Next] [TOP] Back to ODE Page


Then in the MATLAB command line call ODE15s like this:

[t,x] = ode15s('M-file Name',[t0 tf],[x0(1) x0(2)])

Where t0 is the initial time, tf is the final time, x0(1) is the initial value of x(1), and x0(2) is the initial value of x(2). This command will output a vector answer of time and a matrix solution of x corresponding to time.


To find out how to get ODE15s for MATLAB, version 4.2, go to the
Obtaining Software section on our ODE page.

[PREV] [TOP] Back to ODE Page


Page constructed by

Doug Thornhill, James Bopp, Cory Clemmons and Devin Hodgson.

For questions or suggestions, please contact us through dt@u.washington.edu
Last modification on 8 Dec 95.