find a minimum in a 3d matrix

40 ビュー (過去 30 日間)
noa
noa 2013 年 6 月 19 日
hi
i have a 3d matrix P(1000x1000x3
i want to find its' minimum value including location i,j,k
i tried doing this with min(min(min...) but i get very confused
is there an easier way?
thanks

採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 6 月 19 日
[v,loc] = min(P(:));
[ii,jj,k] = ind2sub(size(P),loc);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSensors and Transducers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by