Product

If the block has more than one input, it performs element by element multiplication or division of its inputs. All inputs must have the same size and type as the output, but some inputs may also be 1x1. If the block has one input, the output is 1x1 and is obtained by multiplying (dividing) all the elements of the input vector/matrix. Multiply(*) and divide (/) characters indicate the operations to be performed on the inputs. See also the Matrix Multiplication block.

    Product

Library

Activate/MathOperations

Description

The Product block performs multiplication or division of its inputs. This block produces outputs using either element-wise or matrix multiplication, depending on the value of the Multiplication parameter. You specify the operations with the Number of inputs parameter. Multiply(*) and divide (/) characters indicate the operations to be performed on the inputs.

Inputs can be either real or complex.

Inputs are either scalar, or vector. If vector, all vectors must be of the same size.

In case of a single input, the output is the product of all elements of the input vector.

Parameters

Product_0

NameLabelDescriptionData TypeValid Values

nin

Number of inputs

Number

in_ports

Input ports signs

Structure

in_ports/sgn

Signs

Cell of strings

'*'
'/'

overflow

Do on overflow

String

'Nothing'
'Saturate'
'Error'

rmethod

Rounding method (for integers)

String

'Floor'
'Ceil'
'Round'
'Int'

externalActivation

External activation

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

nin

Port 2

explicit

output

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no

See Also