`A = [2 4 5 6; 5 8 9 6; 8 9 5 6]max(A,[],2)`

The above code provide maximum element from the each row. I came across to max(A,[ ],2) online only. Can you please tell me the logic behind it, what actually matlab is understanding from max(A,[ ], 2)?

Skip to content# MATLAB: Max function to receive maximum element of the row

###### Related Question

MATLABmatricesmatrix

`A = [2 4 5 6; 5 8 9 6; 8 9 5 6]max(A,[],2)`

The above code provide maximum element from the each row. I came across to max(A,[ ],2) online only. Can you please tell me the logic behind it, what actually matlab is understanding from max(A,[ ], 2)?

- How to find the indices of the maximum (or minimum) value of the matrix
- How to select the top 5 five values in a matrix
- Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
- To find the maximum value in a matrix
- Please help me understand the meaning of this [Amax,Bmax]=max(max(AB,[ ],2));
- Given a 5*5 matrix, how to find the element in the 3rd row and 4th column
- Findout the second largest element in each row and its location in a matrix

## Best Answer