How to count numbers greater than a determined value

6 次查看(过去 30 天)
Need help structuring how I would tell MATLAB to count the number of values in a structure greater than a pre determined amount. For example:
I have a vector of data that holds heights ranging from 0 to 100 and I want to count how many are above a threshold above 0.5, then 0.6, then 0.7.... all the way to 100, which would be zero.

采纳的回答

Matt J
Matt J 2022-5-20
编辑:Matt J 2022-5-20
out = cumsum( histcounts(heights,0.5:0.1:100-eps(100)) ,'reverse');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by