<< SQRT Math operations palette SUM_f >>

Scilab Help >> Xcos > palettes > Math operations palette > SUMMATION

SUMMATION

Matrix Addition/Subtraction

Block Screenshot

Contents

Description

This block performs addition or subtraction on scalar, vector or matrix inputs. The input datatype is set with the Datatype parameter. The Number of inputs or sign vector parameter defines the number of inputs and operation. For a single vector's input the block collapse the elements of the vector. Vectors/matrices inputs must have the same size.

The behavior of the block is summarized in the following table :

Number of inputs Operation Remarks
One y = (+/-)u u is a scalar value and the block has the behavior of a unitary gain.
One y = u[1]+u[2]+...+u[N] u is a vector or a matrix and the block output is the sum of the elements of the input vector or matrix.
Two or more y = k[1]*u1+k[2]*u2+...+k[N]*uN k is the scalar or vector value write in the Number of inputs or sign vector parameter. For the addition of all inputs, simply set this parameter to the number of inputs. To add/subtract the input ui, set in this parameter a vector k with k[i] = +1 (addition) or -1 (subtraction) for the input ui.

With integer input, on overflow the result can take different forms:

1- A normal non saturated result. By example, if type is int8 and the result 128, the block output value will be -128.

2- A saturated result. For the previous example the block output value will be 127.

3- An error message warning the user about the overflow.

The user can select one of these three forms by setting the Do on Overflow field to 0, 1 or 2.

Parameters

Default properties

Interfacing function

Computational function

See also


Report an issue
<< SQRT Math operations palette SUM_f >>