FUNCTION REFERENCE
bounds
Smallest and largest elements.
Smallest and largest elements.
Syntax
[S, L] = bounds(A)Syntax
[S, L] = bounds(A, dim)Syntax
[S, L] = bounds(..., nanflag)S is min(A) and L is max(A) along dim (default: the first dimension whose size is not 1), computed together. 'omitnan' (default) ignores NaN values; 'includenan' gives NaN for every vector that holds a NaN. Empty input gives the same empty results as min and max. S and L keep the class of A as min and max do (integer values are selected exactly), for one output or two.
Example
[s, l] = bounds([3 NaN 1 7]) % s = 1, l = 7Example
[s, l] = bounds([1 5; 4 2], 2) % s = [1; 2], l = [5; 4]Differences from MATLAB: No 'all' or vector dimensions. Complex data is not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.