How to know the smallest number after 0
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all, I have set images 3D (256x256x90 uint16), let say P. Anyone know how to know the smallest number after 0?
>> min(min(min(P)))
ans =
uint16
0
>> max(max(max(P)))
ans =
uint16
1387
採用された回答
その他の回答 (1 件)
Chunru
2021 年 12 月 29 日
P = randi([0 65535], [5 5 10], 'uint16'); % smaller size for demonstration
P1 = P(:);
min(P1(P1>0))
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!