draw a histogram from an array
2 ビュー (過去 30 日間)
古いコメントを表示
I now have an array
date visitors
------ --------
1/1 5
1/2 10
1/3 12
What is the simplest way to draw a histogram of visitors?
0 件のコメント
採用された回答
Image Analyst
2022 年 7 月 16 日
編集済み: Image Analyst
2022 年 7 月 16 日
Did you try
bar(t.Data, t.Visitors);
grid on;
xlabel('Date');
ylabel('Number of Visitors');
This assumes that your histogram is in a table like you showed.
2 件のコメント
Image Analyst
2022 年 7 月 18 日
You'd need more than 3 samples. But if you have like hundreds of days, then that could get you a distribution of how many people visited during a certain interval of time (like one day or one week).
その他の回答 (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!