Clear Filters
Clear Filters

How to count the range numbers of a sea state and display a number in each block (in a scatter diagram)?

1 view (last 30 days)
Hi everyone,
I am Alcebiades Hlunguane, and a beginner in MatLab programing.
Can any of you help me in counting for sea state a total o significant wave hights for each see state and build a scatter diagram?
%%%%%%%%%
mu = 0.3149;
sigma = 0.173;
Hs = lognrnd(mu,sigma,63104,12);
lowerbound=1.25;
upperbound=1.75;
data=Hs(Hs>lowerbound & Hs<upperbound);
%%%%%%%%%%
[I expect 57098 displayed]

Accepted Answer

Walter Roberson
Walter Roberson on 26 Mar 2022
use histcounts() passing in edges of 0:0.5:5.5

More Answers (0)

Community Treasure Hunt

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

Start Hunting!