- 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 (최근 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에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!