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