Platform | x64, Win32, .NET |

Purpose |
To get the maximum value of the elements of an array. |

Class |
Transformational function. |

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

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

Return value |
This function determines the maximum value of the elements of ARRAY along dimension DIM corresponding to the true elements of MASK. The result is a scalar or array having the same type. If DIM is not present, the result is scalar, otherwise the result is of rank If ARRAY has size zero, MAXVAL(ARRAY) gives the negative number of largest magnitude for the given type and kind type. If MASK is false for all elements then MAXVAL(ARRAY, MASK=MASK) gives the negative number of largest magnitude for the given type and kind type. |

Example |
If A = [3, 2, 9, 9] then MAXVAL(A) is 9. If A = then MAXVAL(A, MASK = A .LT. 5) is 4. If A = then MAXVAL(A, DIM = 1) is [5, 6, 7, 8] and MAXVAL(A, DIM = 2) is [8, 7] |

Basket

Empty