.. highlightlang:: us .. _prod: prod ==== .. index:: prod .. us.tag prod NOTREADYENGLISH :ref:`prod` calculates the product of all elements for real or complex vectors. If the argument is a matrix, a row vector will be created that contains the product of the matrix columns. .. function:: mProd = prod(m) .. us.return **Return Value** *mProd* is a scalar it *m* is vector. If *m* is a matrix it is a row vector. .. us.params **Parameters** .. uparam:: m *m* is a real or complex matrix. .. us.example **Example** :: * m = int(rand(3,3) * 10) + 1 * m 1.0000 3.0000 8.0000 8.0000 1.0000 4.0000 4.0000 2.0000 8.0000 * prod(m) 32.0000 6.0000 256.0000 * prod(prod(m)) 49152.0000 .. seealso:: :ref:`sum` :sub:`id-33035`