채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 5일
편집: Walter Roberson 2013년 2월 5일

1 개 추천

[minval, minpos] = min(YourArray(:));
[minrow, mincol] = ind2sub(size(YourArray), minpos);
The above if you want to know the row and column as well as the value. If you just want the value then
minval = min(YourArray(:));

추가 답변 (1개)

James Tursa
James Tursa 2013년 2월 5일

1 개 추천

Not exactly sure what you want, but here is code to find the minimum value:
x = rand(2,2);
m = min(x(:));

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by