[英]How to get MATLAB to display the index of the minimum value in a 2D array?
[英]How to get MATLAB to display the row index of the minimum value in every column of a matrix?
我有这样的矩阵:
S =
2.2100 16.0100
0.0100 9.8100
9.4100 0.0100
现在,我想知道每列中最小值的行数。 我正在寻找的向量应如下所示:
D =
2
3
谢谢您的帮助。
[val, ind] = min (S)
您将拥有以下价值:
val =
0.010000 0.010000
ind =
2 3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.