You can use the max
function to find the maximum value in column 3 of the matrix and its row index, and then index the matrix using that row index to isolate that row. Here's an example:
main.m225 chars9 lines
In this example, max_row_vector
will be [2 4 6]
, which is the row with the highest value in column 3.
gistlibby LogSnag