필터 지우기
필터 지우기

How to find the indices of minimum value in a 4D matrix?

조회 수: 4 (최근 30일)
ANANTA BIJOY BHADRA
ANANTA BIJOY BHADRA 2023년 6월 20일
답변: Matt J 2023년 6월 20일
I have a matrix genertared using 4 for loops, The generated matrix is of (3*11*11*11) in size. I need to find the lowest value and indiceswhere the lowest value is present. I tried to use the find command but as far as I understand it wokrs for 2D (x*y) matrices (I might be wrong). How can I find the lowest value and the indices of the lowest value for the (3*11*11*11) matrix?

채택된 답변

Matt J
Matt J 2023년 6월 20일
[lowestValue,locmin]=min(A(:))
[i,j,k,l]=ind2sub(size(A), locmin); %indices of min

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by