how to get maximum value of each column matlab code example Example: column of max of each row matlab [~,I] = max(A,[],2)