Help with minimum of a matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello! I have a function which generates a matrix M containing elements. Some of them are infinite (- Inf for example). I need to extract the minimum finite value of M, but if I write min(M) I obtain of course - Inf. What command can I use ? Thanks
댓글 수: 0
채택된 답변
추가 답변 (1개)
Youssef Khmou
2014년 9월 18일
As are you are concerned about the global mean, you truncate the Inf elements and compute the min:
M(isinf(M))=[];
min(M)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!