Product of matrix elements
mps_prod( rop, op [, orientation] ) rop = mps_prod( op [, orientation] )
Overloaded usage:
rop = prod( op [, orientation] )
multi-precision matrix
single character string
single character string
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.
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.
Creates a multi-precision matrix of the correct size and with the same precision as
op
containing the result.
Overloaded usage.
// 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) | ![]() | ![]() |