SyntaxFix
Write A Post
Hire A Developer
Questions
In case of a 2D array (matrix), you can use:
[val, idx] = max(A, [], 2);
The idx part will contain the column number of containing the max element of each row.