min
阵列的最小元素
Syntax
描述
returns the minimum elements of an array.M
= min(A
)
如果
A
is a vector, thenmin(A)
returns the minimum ofA
。如果
A
是矩阵,然后min(A)
是一个行矢量,包含每列的最小值A
。如果
A
是一个多维数组,然后min(A)
operates along the first dimension ofA
whose size does not equal1
,将元素视为向量。这个维度的大小变成1
尽管所有其他维度的尺寸保持不变。如果A
是一个空数阵列,具有第一维0
, thenmin(A)
returns an empty array with the same size asA
。
___= min(___,'ComparisonMethod',
可选地指定如何比较任何先前语法的元素。例如,对于向量方法
)A = [-1 2 -9]
, the syntaxmin([],“ComparisonMethod”、“abs”)
compares the elements ofA
according to their absolute values and returns-1
。