How to find the indices of minimum value in a 4D matrix?
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Matt J
2023-6-20
[lowestValue,locmin]=min(A(:))
[i,j,k,l]=ind2sub(size(A), locmin); %indices of min
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!