Subsections
Activation union
Events
This block is an event addition block with up to three inputs. The
output reproduces the events on all the input ports. Strictly
speaking, CLKSOMV is not a Scicos block because it is discarded at the
compilation phase. The inputs and output of CLKSOMV are synchronized.
- always active: no
- direct-feedthrough: no
- zero-crossing: no
- mode: no
- number/sizes of inputs: 0 /
- number/sizes of outputs: 0 /
- number/sizes of activation inputs: 3 / 1 1 1
- number/sizes of activation outputs: 1 / 1
- continuous-time state: no
- discrete-time state: no
- name of computational function: sum
scilab/macros/scicos_blocks/events/CLKSOMV_f.sci
/* Copyright INRIA */
#include "../machine.h"
/* Element wise som */
void
sum(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,ipar[],*nipar,insz[];
integer *nin,outsz[],*nout;
double x[],xd[],z[],tvec[],rpar[];
double *inptr[],*outptr[],*t;
{
int k,i,n;
double *y;
double *u;
n=outsz[0]; /* insz[0]==insz[1] .. ==insz[*nin]== outsz[0] */
y=(double *)outptr[0];
for (i=0;i<n;i++) {
y[i]=0.0;
for (k=0;k<*nin;k++) {
u=(double *)inptr[k];
y[i]=y[i]+u[i]*rpar[k];
}
}
}
Ramine Nikoukhah
2004-06-22