Next: 5.2.2.6 Computational function type
Up: 5.2.2 Types of Computational
Previous: 5.2.2.4 C case
This Computational function type is specific to programming in C. The
synopsis is:
#include "<SCIDIR>/routines/machine.h"
void selector(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
rpar,nrpar,ipar,nipar,inptr,insz,nin,outptr,outsz,nout)
integer *flag,*nevprt,*nx,*nz,*ntvec,*nrpar;
integer ipar[],*nipar,insz[],*nin,outsz[],*nout;
double x[],xd[],z[],tvec[],rpar[];
double *inptr[],*outptr[],*t;
See Table 4 for a description of arguments.
Table 4:
Arguments of Computational functions of type 2. I: input, O: output.
I/O |
Args. |
description |
I |
*flag |
0,1,2,3,4,5 or 6, (see Table 1) |
I |
*nevprt |
activation code |
I |
*t |
time |
O |
xd |
derivative of the continuous
state ( flag=0) |
I/O |
x |
continuous state |
I |
*nx |
size of x |
I/O |
z |
discrete state |
I |
*nz |
size of z |
O |
tvec |
times of output events ( flag=3) |
I |
*ntvec |
number of activation output ports |
I |
rpar |
parameter |
I |
*nrpar |
size of rpar |
I |
ipar |
parameter |
I |
*nipar |
size of ipar |
I |
inptr |
inptr[i] is pointer to
beginning of ith input |
I |
insz |
insz[i] is the size of the
ith input |
I |
*nin |
number of input ports |
I |
outptr |
outptr[j] is pointer to
beginning of jth output |
I |
outsz |
outsz[j] is the size of the
jth output |
I |
*nout |
number of output ports |
|
Next: 5.2.2.6 Computational function type
Up: 5.2.2 Types of Computational
Previous: 5.2.2.4 C case
Scilab Group