[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
An other problem
From: |
John W. Eaton |
Subject: |
An other problem |
Date: |
Thu, 19 Jun 2003 23:17:34 -0500 |
On 20-Jun-2003, Yann Lamontagne a.k.a. daume <address@hidden> wrote:
| I am trying to plot
| function xdot = lorenz(x)
| xdot(1) = 10*x(2) - 10*x(1)
| xdot(2) = x(1)*2.666 - x(3)*x(1) - x(2)
| xdot(3) = x(1)*x(2) - 28*x(3)
| end
| solution=lsode( "lorenz",[1, 1, 1], t = linspace(0.0,100, 5000))
| gset parametric
| gsplot(solution)
|
| the solution seems to have two sets of data and I believe it is plotting
| the wrong set, do anyone know how to fix that?
I think you are doing the right thing, but the set of equations that
you are using don't look like the same ones I have seen before. Also,
starting point is critical to getting a interesting behavior and a
pretty plot. If I use
function y = lorenz (x, t)
y = [10 * (x(2) - x(1));
x(1) * (28 - x(3));
x(1) * x(2) - 8/3 * x(3)];
endfunction
x = lsode ("lorenz", [3; 15; 1], (0:0.01:25)');
gset parametric
gsplot x
I get a plot that looks a lot like the one on the Octave home page
(but with 3d axes).
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- An other problem, Yann Lamontagne a.k.a. daume, 2003/06/19
- An other problem,
John W. Eaton <=