Scicos Block
fr - eng

##
Matrix Sum

### Contents

- Matrix Sum
  - Palette
  - Description
  - Dialog box
  - Default properties
  - Interfacing function
  - Computational function
  - See also
  - Authors

### Palette

- Matrix - Matrix operation palette

### Description

The MATSUM block returns the sum of the element of an input matrix/vector. When the Sum along is set to all the block outputs the sum of all the elements of the matrix. The output is then a scalar. When the Sum along is set to lines the block is a row-wise sum. The output is a row vector. When the Sum along is set to Columns the block is a column-wise sum. The output is a column vector. The equivalent function of this block in Scilab is: "sum".

### Dialog box

- Datatype(1=real double 2=Complex)
  It indicates the type of the output. It support only the two types double (1) and complex (2). If we input another entry in this label Scicos will print the message "Datatype is not supported".
  Properties : Type 'vec' of size 1.

- Sum along (0=all 1=lines 2=Columns)
  Indicates the used rule to sum. For more information see the description part.
  Properties : Type 'vec' of size 1.

### Default properties

- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- regular inputs:
  - port 1 : size [-1,-2] / type 1
- regular outputs:
  - port 1 : size [1,1] / type 1
- number/sizes of activation inputs: 0
- number/sizes of activation outputs: 0
- continuous-time state: no
- discrete-time state: no
- object discrete-time state: no
- name of computational function: mat_sum

### Interfacing function

- SCI/macros/scicos_blocks/MatrixOp/MATSUM.sci [view code]

### Computational function

- SCI/routines/scicos/mat_sum.c [view code]
- SCI/routines/scicos/mat_suml.c [view code]
- SCI/routines/scicos/mat_sumc.c [view code]
- SCI/routines/scicos/matz_sum.c [view code]
- SCI/routines/scicos/matz_suml.c [view code]
- SCI/routines/scicos/matz_sumc.c [view code]

### See also

- SUBMAT - SUBMAT Sub-matrix extraction (Scicos Block)
- SUMMATION - SUMMATION Matrix Summation (Scicos Block)

### Authors

Fady NASSIF INRIA