- 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.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
usman ali
am 21 Nov. 2021
Kommentiert: usman ali
am 21 Nov. 2021
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 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 21 Nov. 2021
Bearbeitet: KALYAN ACHARJYA
am 21 Nov. 2021
Hints: Use logical indexing
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!