matlab 如何求矩阵每行的最大值

如题所述

建议看看max的help文件
[Y,I] = MAX(X) returns the indices of the maximum values in vector I.
[Y,I] = MAX(X,[],DIM) operates along the dimension DIM.
也就是说,max本身就可以输出其位置,在I向量中,dim可以选择行,或列。
温馨提示:答案为网友推荐,仅供参考