# 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.

## Library

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

Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|

| Number of inputs | Number | ||

| Input ports signs | Structure | ||

| Signs | Cell of strings | '*' | |

| Do on overflow | String | 'Nothing' | |

| Rounding method (for integers) | String | 'Floor' | |

| External activation | Number | 0 |

## Ports

Name | Type | Description | IO Type | Number |
---|---|---|---|---|

| explicit | input | nin | |

| explicit | output | 1 | |

| activation | input | externalActivation |

## Advanced Properties

Name | Value | Description |
---|---|---|

| no | |

| yes | |

| no | |

| no | |

| no | |

| no |