** Next:** Systems of First Order
** Up:** First Order ODEs Numerically
** Previous:** Example
** Contents**

##

Using ` nsys.m`

The routine ` nsys.m` will use the Euler method to
solve a 2 by 2 system. To set up the calculation, you need
to edit ` initnsys.m`. For instance, if your system
of equations is

your initial conditions are , , and
your desired step size is , and you want to compute
up to the final time ,
then ` initnsys.m` should read as follows:
eulerfcn1='x+h*(t+x+y)';
eulerfcn2='y+h*x^2';
h=0.1;
t0=0; tf=0.5; x0=2; y0=3;

After you edit ` initnsys.m`, save it, then run
` initnsys`, followed by ` nsys`. The graphics
window will show a plot of and versus , while
the command window shows the computed numerical values.

*Michael Renardy*

*2000-05-12*