ext11c.c

Go to the documentation of this file.
00001 /* Copyright Inria/Enpc */
00002 
00003 #include "stack-c.h"
00004 
00005 /****************************************
00006  *     exemple with a call to ReadMatrix
00007  *     -->param=[0.04,10000,3d+7]; 
00008  *     -->link('ext11c.o','ext11c','C')  
00009  *     -->y=ode([1;0;0],0,[0.4,4],'ext11c') 
00010  *     param must be defined as a scilab variable 
00011  *********************************/
00012 
00013 int ext11c(int *neq, double *t, double *y, double *ydot)
00014 {
00015     static int m, n;
00016     static double param[3];
00017     ReadMatrix("param", &m, &n, param);
00018     ydot[0] = -param[0] * y[0] + param[1] * y[1] * y[2];
00019     ydot[2] = param[2] * y[1] * y[1];
00020     ydot[1] = -ydot[0] - ydot[2];
00021     return(0);
00022 }

Generated on Sun Mar 4 15:03:57 2007 for Scilab [trunk] by  doxygen 1.5.1