finding position in matrix
1 次查看(过去 30 天)
显示 更早的评论
I couldnt find the way to figure out how find position M(m,n) matrix can you help me ?
2 个评论
Michael Soskind
2020-4-20
If you want to find a list of positions, you can use:
find(condition)
Where condition might look like M == 1
Alternatively, you could simply use
M == 1
Which would return a logical array of size n x m, meaning that calling M(M==1) would give you a list of the values at the indices above.
Ameer Hamza
2020-4-20
sarp, can you further elaborate your question with an example of what you mean by "find position M(m,n)"?
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!