Subsections

- Library
- Description
- Default properties
- Interfacing function
- Computational function (type 2)

##
Addition

### Library

Linear

### Description

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 3 / -1 -1 -1
- number/sizes of outputs: 1 / -1
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: no
- name of computational function: plusblk

### Interfacing function

`scilab/macros/scicos_blocks/linear/SUM_f.sci`

### Computational function (type 2)

    /* Copyright INRIA */
    #include "../machine.h"

    /* Element wise som */

    void
    plusblk(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];
          }
        }
    }