Find mean of arrays values which is bigger than threshold
古いコメントを表示
Let`s say I have array (960x1280)of some numbers, and i want to find mean of numbers which are bigger than some threshold (e.g. 20).
回答 (1 件)
Jos (10584)
2014 年 3 月 14 日
The following will return the mean across all array elements.
tf = MyArray > Threshold
MyMean = mean(reshape(MyArray(tf),1,[]))
The reshape is needed in case all elements are above the threshold ...
カテゴリ
ヘルプ センター および File Exchange で Image Thresholding についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!