HyperMath

Prod

Prod

Previous topic Next topic No expanding text in this topic  

Prod

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The product of matrix elements in a specified dimension.

Syntax

P = Prod(M, DIM)

Arguments

Name

Description

 

M

A vector or a matrix.

 

DIM

(optional)

The dimension on which to multiply. For products by column, dim = 1. For products by row, dim = 2. If m is a matrix, dim defaults to 1. If m is a vector and dim is omitted, the product of the elements is returned, regardless of the vector orientation.

Output

Name

Description

 

P

The product of the row/column vector elements. If m is  a matrix, p will be either a row vector or a column vector, depending on the value of dim.

Example

Find the column products of a matrix.

 

Syntax

 

P = Prod([1,2;3,4], 1)

 

Result

 

P = [3, 8]