Matlab中max函数在矩阵中求函数大小的实例如下:
C = max(A)
返回一个数组各不同维中的最大元素。
如果A是一个向量,max(A)返回A中的最大元素。
如果A是一个矩阵,max(A)将A的每一列作为一个向量,返回一行向量包含了每一列的最大元素。
如果A是多为数组,max(A) treats the values along the first non-singleton dimension as vectors, returning the maximum value of each vector.
C = max(A,B)
返回一个和A和B同大小的数组,其中的元素是从A或B中取出的最大元素。
C = max(A,[],dim)
返回A中有dim指定的维数范围中的最大值。
[C,I] = max(…)
找到A中那些最大值的索引位置,将他们放在向量I中返回。如果这里有多个相同最大值时,返回的将是第一个的索引。
max
Maximum elements of an array
Syntax
C = max(A)
C = max(A,B)
C = max(A,[],dim)
[C,I] = max(…)
Description
C = max(A) returns the largest elements along different dimensions of an array. If A is a vector, max(A) returns the largest element in A. If A is a matrix, max(A) treats the columns of A as vectors, returning a row vector contai