help-octave
[Top][All Lists]

## Re: An other problem

 From: Yann Lamontagne a.k.a. daume Subject: Re: An other problem Date: Fri, 20 Jun 2003 12:08:02 +0000 (UTC)

```Maybe it was the initial condition since I know I have the right formula
from http://astronomy.swin.edu.au/%7Epbourke/fractals/lorenz/ and a text
book.  But the now with the same way to write the equation(not same
formula) and your initial condition I get nice results.

thanks
YAnn

On Thu, 19 Jun 2003, John W. Eaton wrote:

> Date: Thu, 19 Jun 2003 23:17:34 -0500
> From: John W. Eaton <address@hidden>
> To: Yann Lamontagne a.k.a. daume <address@hidden>
> Cc: help-octave mailing list <address@hidden>
> Subject: An other problem
>
> 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
>

--
http://daume.org
http://yann.lamontagne.name (my PGP(GPG) Public Key)
E8A4 CB00 2CCC 97FE 549D 1CBC D218 2DC4 F9B6 5B15 (my fingerprint)

"Laws: We know what they are, and what they are worth! They are
spider webs for the rich and mighty, steel chains for the poor and
weak, fishing nets in the hands of government."
--Pierre Joseph Proudhon

-------------------------------------------------------------
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
-------------------------------------------------------------

```