Plotting a normalised histogram graph
古いコメントを表示
Hi there,
I've imported a column vector of 3000 'distances traveled' values.
I am hoping to plot a graph similar to this one
I'm only interested in plotting the blue bars
I'm fairly new to matlab, could somebody please advise me on how I would to this.
For the blue bars would I need to normalize the data first and then plot a histogram chart? What function would I use?
Many thanks
John
採用された回答
その他の回答 (1 件)
Morteza Darvish Morshedi
2021 年 3 月 12 日
編集済み: Morteza Darvish Morshedi
2021 年 3 月 12 日
In the recent versions of MATLAB:
% D is your data
% b can be number of bins, or edges
histogram(D,b, 'Normalization','probability');
カテゴリ
ヘルプ センター および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!