- Get the data those are greater than 1: mat>1
- Subtract 1 from all elements of the matrix - mat-1
- Get the min one - min(mat)
How can I find a number from a matrix, which is greater than and closest to 1.
3 次查看(过去 30 天)
显示 更早的评论
How can I find a number from a matrix, which is greater than and closest to 1. As I showed in attached table as an example. I know about indexing that just specifying the row and coloum I can find, however, if I have a huge matrix and I need to find this number and its row and coloumn than how can I find using find command etc. Thanks in advance.
0 个评论
采纳的回答
KALYAN ACHARJYA
2021-11-21
编辑:KALYAN ACHARJYA
2021-11-21
Hints: Use logical indexing
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!