diff examples/oregonator.cc @ 2689:8c7955a8d49f

[project @ 1997-02-18 09:06:10 by jwe]
author jwe
date Tue, 18 Feb 1997 09:09:12 +0000
parents
children 7c96e85c76db
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/examples/oregonator.cc
@@ -0,0 +1,17 @@
+#include <octave/oct.h>
+
+#include <iostream.h>
+
+DEFUN_DLD (oregonator, args, ,
+  "The `oregonator'.")
+{
+  ColumnVector dx (3);
+
+  ColumnVector x = args(0).vector_value ();
+
+  dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0) - 8.375e-06*pow (x(0), 2));
+  dx(1) = (x(2) - x(0)*x(1) - x(1)) / 77.27;
+  dx(2) = 0.161*(x(0) - x(2));
+
+  return octave_value (dx);
+}