How to call the row number of an element?
32 次查看(过去 30 天)
显示 更早的评论
suppose I find a value after applying some formula and then need to find the row/column in the matrix where the value appears.
How do I do this?
0 个评论
采纳的回答
Veronica Taurino
2022-8-3
编辑:Veronica Taurino
2022-8-3
%[row,col] = find(__)
For example:
X = [1 0 2; 0 1 1; 0 0 4]
[row,col] = find(X==4)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!