Smallest and largest elements
[
computes the smallest and largest values based on the dimensions specified in the vectorS
,L
] = bounds(A
,vecdim
)vecdim
. For example, ifA
is a matrix, thenbounds(A,[1 2])
returns the smallest and largest values over all elements inA
, since every element of a matrix is contained in the array slice defined by dimensions 1 and 2.