annotate examples/oregonator.m @ 8710:739141cde75a ss-3-1-52

fix typo in Array-f.cc
author Jaroslav Hajek <highegg@gmail.com>
date Mon, 09 Feb 2009 21:51:31 +0100
parents 4270ded9ddc6
children 4295d634797d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
1 ## Copyright (C) 1997, 1998, 2007 John W. Eaton
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
2 ##
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
3 ## This file is part of Octave.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
4 ##
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
6 ## under the terms of the GNU General Public License as published by
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
8 ## your option) any later version.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
9 ##
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
13 ## General Public License for more details.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
14 ##
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
15 ## You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
17 ## <http://www.gnu.org/licenses/>.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 3162
diff changeset
18
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
19 ## The `oregonator'.
3162
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
20 ##
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
21 ## Reference:
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
22 ##
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
23 ## Oscillations in chemical systems. IV. Limit cycle behavior in a
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
24 ## model of a real chemical reaction. Richard J. Field and Richard
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
25 ## M. Noyes, The Journal of Chemical Physics, Volume 60 Number 5,
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 2689
diff changeset
26 ## March 1974.
2689
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
27
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
28 function dx = oregonator (x, t)
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
29
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
30 dx = zeros (3, 1);
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
31
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
32 dx(1) = 77.27*(x(2) - x(1)*x(2) + x(1) - 8.375e-06*x(1)^2);
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
33 dx(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27;
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
34 dx(3) = 0.161*(x(1) - x(3));
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
35
8c7955a8d49f [project @ 1997-02-18 09:06:10 by jwe]
jwe
parents:
diff changeset
36 end