How count the number of occurence beyond a threshoold value in a matrix

2 views (last 30 days)
Suppose there is a matrix of a = 512*512 elements. What is the count of the elements having more than 255 in the matrix? Kindly suggest.?

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 17 Nov 2017
sum(a(:)>255)

More Answers (0)

Categories

Find more on Image Processing Toolbox 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!