MINVAL

Platform

x64, Win32, .NET

Purpose

To get the minimum value of the elements of an array.

Class

Transformational function.

Syntax

FUNCTION MINVAL(ARRAY, DIM [, MASK])
FUNCTION MINVAL(ARRAY [, MASK])
INTEGER DIM
LOGICAL MASK

Description

ARRAY is an integer or real array. DIM is a scalar integer in the range 1 < DIM < n where n is the rank of ARRAY. MASK is a logical array that is conformable with ARRAY.

Return value

This function determines the minimum 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 n - 1 and has a shape that is the same as that of ARRAY but omitting dimension DIM.

If ARRAY has size zero, MINVAL(ARRAY) gives the positive number of largest magnitude for the given type and kind type.

If MASK is false for all elements then MINVAL(ARRAY, MASK=MASK) gives the positive number of largest magnitude for the given type and kind type.

Example

If A = [3, 2, 2, 9] then MINVAL(A) is 2.

If A = then MINVAL(A, MASK = A > 5) is 7.

If A = then MINVAL(A, DIM = 1) is [1, 2, 3, 4] and MINVAL(A, DIM = 2) is [1, 4].

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited