next up previous contents
Next: One Way to Plot Up: Using sys3plot.m Previous: Using sys3plot.m   Contents

Examples

$\bullet$
cclin.m $\begin{array}{rcrcr} x_1' &=& x_1 \,+\, x_2 \\ x_2' &=& 4\,x_2
\,+\, x_2 \end{...
... \quad x_1(0) \,=\, 3, \;\; x_2(0) \,=\, 2,
\;\; t_0 \,=\, 0, \;\; t_f \,=\, 2$

  1. $\left[\begin{array}{c}x_1' \\ x_2'\end{array}\right] \;=\; \underbrace{\left[\b...
...\; \Longrightarrow \;\; \mbox{\bf x}\,=\,
\mbox{\boldmath$\xi$}\,\mbox{e}^{rt}$

    \begin{displaymath}0 \;=\; \left\vert\begin{array}{*{2}{c}}1 - r & 1 \\ 4 & 1 - ...
...3)(r + 1) \; \Longrightarrow \;r_1 \,=\, 3, \;\; r_2
\,=\, - 1\end{displaymath}

    $\circ$
    $r_1 \,=\, 3 \; \Longrightarrow \;(\mbox{\bf A}- 3\,\mbox{\bf I})\,\mbox{\boldma...
...
\mbox{\bf0}\,=\, (\mbox{\bf A}- 3\,\mbox{\bf I})\,\mbox{\boldmath$\xi$}^{(1)}$

    \begin{eqnarray*}
\; \Longrightarrow \;&& \mbox{solve}\;\; \left[\begin{array}{*...
...\left[\begin{array}{c}1 \\ 2\end{array}\right]\, \mbox{e}^{3 t}
\end{eqnarray*}



    $\circ$
    $r_2 \,=\, -1 \; \Longrightarrow \;(\mbox{\bf A}+ \mbox{\bf I})\,\mbox{\boldmath...
...=\,
\mbox{\bf0}\,=\, (\mbox{\bf A}+ \mbox{\bf I})\,\mbox{\boldmath$\xi$}^{(2)}$

    \begin{eqnarray*}
\; \Longrightarrow \;&& \mbox{solve}\;\; \left[\begin{array}{*...
...\left[\begin{array}{c}1 \\ -2\end{array}\right]\, \mbox{e}^{-t}
\end{eqnarray*}






    After establishing linear independence, we have the general solution

    \begin{eqnarray*}
\lefteqn{\mbox{\bf x}\;=\; c_1\,\mbox{\bf x}^{(1)} \,+\, c_2\,...
...& c_1\,2\,\mbox{e}^{3 t}
&-& c_2\,2\,\mbox{e}^{-t} \end{array}
\end{eqnarray*}



    \begin{eqnarray*}
\mbox{\bf x}(0) &=& \left[\begin{array}{c}x_1(0) \\ x_2(0)\end...
... x_2(t) &=& 4\,\mbox{e}^{3 t}
&-& 2\,\mbox{e}^{-t} \end{array}
\end{eqnarray*}



  2. Change only the following in initsys.m
    t0 = 0; tf = 2;
    x0vec = [3,2];
    A = [1, 1; 4, 1];
    B = [$\;$];
    x1symb = '2*exp(3*t)+exp(-t)';
    x2symb = '4*exp(3*t)-2*exp(-t)';
    eqnname = 'cclin';
    symbolicplot = 'solutions';
    % symbolicplot = 'phase';
    % symbolicplot = 'eigenvals';
    % symbolicplot = '';
    Save, then type initsys to initialize (or copy-and-paste at the Emporium).

  3. Type sys3plot

  4. Make a visual check that your symbolic work matches the appropriate plot in Figure 1. If all appears correct, print a copy of the display.

  5. The finished product is on the next page. (Note: Your work in the upper left will be neatly hand written, not typed.) Also note that the MATLAB plots ore only as good as the information you supplied for t0, tf, x0vec, and A. Remember GIGO (Garbage In, Garbage Out).


\begin{picture}(15,22)
\par %% Use the following put to LaTeX and generate HTML...
...ray}\right]\,\mbox{e}^{-t}$\renewedcommand{arraystretch}{1}
} }}
\end{picture}


next up previous contents
Next: One Way to Plot Up: Using sys3plot.m Previous: Using sys3plot.m   Contents
Michael Renardy
2000-05-12