find min or max value element from more than two matrices
이전 댓글 표시
I know how we can find min or max value element from two matrices. For more than two matrices we can do two by two and then compare but I was wondering if there is any other simple way to find min or max value element from more than two matrices?
채택된 답변
추가 답변 (1개)
Image Analyst
2014년 6월 2일
For 3 matrices, you can do
minValue = min([a(:);b(:);c(:)])
maxValue = max([a(:);b(:);c(:)])
It's easy to see how to adapt it for more matrices.
댓글 수: 2
dpb
2014년 6월 2일
편집: Image Analyst
2014년 6월 2일
Good 'un to use (:) to avoid the dimensions problem...don't know why didn't think of it. I removed the sorrier response.
Star Strider
2014년 6월 2일
Much more efficient.
+1
카테고리
도움말 센터 및 File Exchange에서 Robust Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!