How to plot my histogram
5 ビュー (過去 30 日間)
古いコメントを表示
I have made a load of files, etc that give me a load of random numbers. I want to plot a frequency histogram with the frequencies: 0 - 0.09, 0.1 - 0.19, 0.2 - 0.29, etc along the 'x' axis and the frequency of these along the 'y'.
I have the frequencies, but I'm not sure how to get Matlab to to put the x intervals as what I want. How do I do this?
I read "help hist" and this just tells me that if I put in hist(X) then Matlab automatically puts it in 10 equally spaced bins, but I want to put them in the ones I have come up with.
Can you help me please?
0 件のコメント
回答 (1 件)
Walter Roberson
2012 年 11 月 7 日
Use histc() to do the calculation, and bar() to do the plotting.
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!