Frequency histogram for selected values in a vector
2 ビュー (過去 30 日間)
古いコメントを表示
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.
採用された回答
Rik
2017 年 10 月 11 日
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 件のコメント
Rik
2017 年 10 月 14 日
Why don't you read the documentation?
'Normalization' — Type of normalization
'count' (default) | 'probability' | 'countdensity' | 'pdf' | 'cumcount' | 'cdf'
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!