Platform | x64, Win32, .NET |

Purpose |
To get the product of all the elements of an array. |

Class |
Transformational function. |

Syntax |
FUNCTION PRODUCT(ARRAY, DIM [, MASK]) |

Description |
ARRAY is an array of type integer, real or complex. DIM is a scalar integer in
the range 1 |

Return value |
Case (i): The result of PRODUCT(ARRAY) has a value equal to the product of all the elements of ARRAY. It has the value one if ARRAY has size zero. Case (ii): The result of PRODUCT (ARRAY, MASK = MASK) has a value equal to the product of the elements of ARRAY corresponding to the elements of MASK that are true. It has the value one if there are no true elements. Case (iii): The result of PRODUCT(ARRAY, DIM = DIM [, MASK = MASK]) has a value equal to the product (using the mask if present) of the elements of ARRAY along the given dimension. |

Example |
If A = then PRODUCT(A, DIM = 1) gives [4, 10, 18] and PRODUCT(A, DIM = 2) gives [6, 120]. |

Basket

Empty