Reputation: 3432
I'd like to be able to create a column vector whose values in each row correspond to the column in a matrix with the max value in that specific row.
For example, If I have a matrix such as:
A = [1,5,2;3,1,1;0,1,0];
I'd end up with the matrix:
maxValueColumns = transpose([2,1,2]);
Is there an easy/efficient way to do this?
Upvotes: 0
Views: 73