Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

prod

Computes the product of a given vector or the sum for each column vector of a matrix.

prod(x)

Just returns the value, since the product of one scalar is the scalar itself.

Argument x

Scalar

Returns 1. entry

Value

prod(m)

Evaluates the vector(s) and outputs the product(s) of the vector(s).

Argument m

Matrix

Returns 1. entry

Value

Example

prod([1,2,3,4,5,6,7,-1])

Computes the product of the vector, which is -5040 in this case.

Example

prod([1,2;3,4;5,6;7,-1])

Computes the product of the two vectors, which are 105 and -48 in this case.

Clone this wiki locally