draw a histogram from an array
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
alpedhuez
il 16 Lug 2022
Commentato: Image Analyst
il 18 Lug 2022
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 Commenti
Risposta accettata
Image Analyst
il 16 Lug 2022
Modificato: Image Analyst
il 16 Lug 2022
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 Commenti
Image Analyst
il 18 Lug 2022
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).
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!