<< mps_prec mpscilab mps_round >>

mpscilab >> mpscilab > mps_prod

mps_prod

Product of matrix elements

Calling Sequence

mps_prod( rop, op [, orientation] )
rop = mps_prod( op [, orientation] )

Overloaded usage:

rop = prod( op [, orientation] )

Arguments

rop

multi-precision matrix

orientation

single character string

algorithm

single character string

Description

Compute the product of the elements of matrix op according to orientation parameter using the specified algorithm. The result is return in rop which must be of the right size for the specified computation.

mps_prod( rop, op [, orientation] )

Computes the product of all of the elements of op along the specified orientation and returns the result in rop. The orientation is specified as a single character either '*', 'r' and 'c' respectively for row, column and whole matrix.

rop = mps_prod( op [, orientation] )

Creates a multi-precision matrix of the correct size and with the same precision as op containing the result.

rop = prod( rop, op [, orientation] )

Overloaded usage.

Examples

// Product of all the elements of a matrix.
A = [1 2; 3 4]
mpsA = mps_init2(A,100)
rop = mps_init(1,1,100)
rop = mps_prod( A )

// Column-wise product of the elements of a matrix.
A = [1 2; 3 4]
mpsA = mps_init2(A,100)
rop = mps_init(1,2,100)
mps_prod(rop,A,'c')

// Product of all the elements of a matrix using the overloaded prod() function.
A = [1 2; 3 4]
mpsA = mps_init2(A,100)
rop = prod(A)

See Also

<< mps_prec mpscilab mps_round >>