找出符合条件的元素位置
[rows cols]=find(条件)
找出最大值所在的位置
[rows cols]=find(a=max(a(:)));
找出最小值的位置
[rows cols]=find(a=min(a(:)));
本文介绍了如何使用 find 函数在矩阵中找到最大值和最小值的位置。通过设定条件,可以快速定位到特定值所在的行和列。
找出符合条件的元素位置
[rows cols]=find(条件)
找出最大值所在的位置
[rows cols]=find(a=max(a(:)));
找出最小值的位置
[rows cols]=find(a=min(a(:)));

被折叠的 条评论
为什么被折叠?