- 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 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
usman ali
il 21 Nov 2021
Commentato: usman ali
il 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 Commenti
Risposta accettata
KALYAN ACHARJYA
il 21 Nov 2021
Modificato: KALYAN ACHARJYA
il 21 Nov 2021
Hints: Use logical indexing
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!