next up previous contents
Next: Example 2 Up: Examples Previous: Examples   Contents

Example 1

When you first copy init.m, it should be set to run this example.
Plot a slopefield for $x' \,=\, 2\,t\,x$ over a rectangle illustrating the general characterisics of the ODE. Then plot one solution to the ODE within this rectangle.
  1. Change only the following in init.m
    ftx = '2*t*x'; (``$*$'' indicates multiplication)
    initax = [1,4,-2,0];
    Save then type init in the command window to initialize the variables (or copy-and-paste in the Emporium).

  2. See the example for slopef, page [*], to investigate the window size initax = [1,4,-2,0]; then make the change to initax = [-2,2,-2,2]; in init.m. Save then type init in the command window to initialize the variables (or copy-and-paste in the Emporium).

  3. Type sol1. Answer ``y'' to draw new slopefield

    \begin{picture}(5,5.5)
\put(1,0){\includegraphics [width=5cm,height=5cm]{inst2f02.ps}}
\end{picture}

  4. Have MATLAB draw a solution close to $(t_0, x_0) \,=\,
(1,1)$ by clicking near that initial condition on the slopefield.

    \begin{picture}(5,5.5)
\put(1,0){\includegraphics [width=5cm,height=5cm]{inst2f03.ps}}
\end{picture}

    From the graphics display we observe the actual $(t_0, x_0)$-value. (In this case $(1.0932, 0.95208)$.)


next up previous contents
Next: Example 2 Up: Examples Previous: Examples   Contents
Michael Renardy
2000-05-12