How to know the smallest number after 0
1 view (last 30 days)
Show older comments
Commented: Voss on 29 Dec 2021
Hi all, I have set images 3D (256x256x90 uint16), let say P. Anyone know how to know the smallest number after 0?
The smallest uint16 number after zero is one.
If you want to find the smallest number greater than 0 that is in your image data, you can do this:
min(P(P > 0))
More Answers (1)
Chunru on 29 Dec 2021
P = randi([0 65535], [5 5 10], 'uint16'); % smaller size for demonstration
P1 = P(:);
Find more on Image Preview and Device Configuration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!