next up previous contents
Next: Examples Up: First Order ODEs Symbolically Previous: Example   Contents


Using sol1.m

We want to plot a specific numerical solution for the first order ODE $x' \,=\, f(t,x)$ over a user-designated window $a \,\leq\, t \,\leq\, b$, $c \,\leq\, x \,\leq\, d$. However we want freedom to enter the initial condition $(t_0, x_0)$ either via the graphics window or command window.
  1. Make the appropriate changes in init.m.
    ftx = '$f(t,x)$'; (RHS of $x' \,=\, f(t,x)$)
    initax = [$a$,$b$,$c$,$d$]; (desired window size)
    Save then type init in the command window to initialize the variables (or copy-and-paste in the Emporium).

  2. If necessary, use slopef.m to determine suitable entries for initax (i.e., the plot rectangle).

  3. Type sol1. You will be asked if you want a new slopefield. Answering ''y'' for ''yes'' will erase any existing slopefield and plot a new one.

  4. At the command prompt you will be instructed to
    Click on initial point; outside the graphics frame for manual entry
    Use the crosshairs to click on the desired initial condition $(t_0, x_0)$ or click outside the plot, but inside the graphics window, for manual entry of the $t_0$, $x_0$-values in the command window.



Subsections
next up previous contents
Next: Examples Up: First Order ODEs Symbolically Previous: Example   Contents
Michael Renardy
2000-05-12