Frequency histogram for selected values in a vector
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dimitrios Bentis
am 5 Okt. 2017
Kommentiert: Rik
am 14 Okt. 2017
I have 3 vectors time, wind speed and wind direction. I want to plot a histogram showing the relative frequency (or the absolute frequency) of occurrence of wind speeds below 4 knots for every 30 degree arc. In that way i will be able to see which 30 degree arc has the highest frequency of wind speeds below 4 knots.
2 Kommentare
Akzeptierte Antwort
Rik
am 11 Okt. 2017
You can use logical indexing to filter your data:
LowWindData=data(WindSpeed<4);
histogram(LowWindData)
See doc histogram what other options you have to achieve a result that best suits your needs.
3 Kommentare
Rik
am 14 Okt. 2017
Why don't you read the documentation?
'Normalization' — Type of normalization
'count' (default) | 'probability' | 'countdensity' | 'pdf' | 'cumcount' | 'cdf'
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!