In MATLAB, the Max function in the matrix to find the function of the size of the example is as follows:
(1) C = max (A)
Returns the largest element in a different dimension of an array.
If a is a vector, Max (a) returns the largest element in a.
If A is a matrix,Max (a) takes each column of a as a vector, returns a row vector, and the first element of the vector is the maximum value on column I of Matrix A .
If A is a multidimensional array, Max (a) treats the values along the first Non-singleton dimension as vectors, returning the maximum value of each Vector.
(2) [Y,u]=max (A): returns the maximum value for each column of row vector Y and u,y vector record A, and the U Vector records the line number of the maximum value for each column.
(3) Max (A,[],dim): Returns the maximum value in the range of dimensions that have dim specified in A.
Dim takes 1 or 2.
Dim fetch 1 O'Clock,[Y,i]=max (m,[],1), in the 1th dimensional direction of the maximum value, that is, the maximum value of each column, the result exists in Y, I saved is the maximum value of each column row position .
The function is exactly the same as Max (A);
Dim takes 2 o'clock,[Y,i]=max (m,[],2), in the 2nd dimensional direction of the maximum value, that is, the maximum value per row, the result exists in Y, I is the maximum value of each row of the column position.
The function returns a column vector whose first element is the maximum value on line I of the A matrix.
The function that asks for the minimum value is min, and its usage is exactly the same as Max.
Usage of max function in MATLAB