Importing histogram count and bin values into a matlab histogram object
Afficher commentaires plus anciens
Hello,
I have a two vectors that describe a histogram.
I'd like to import those into a Matlab histogram object so that I can change parameters more easily.
For instance, this is basically what I have:
Center bin values:
BinValues = [-4 -3 -2 -1 0 1 2 3 4 ];
and count values per bin
CountValues = [7 8 2 6 0 3 4 6 1];
This is simplified of course, but in the future I might want to do something like reduce the number of bins from 9 to 5.
How do I create a matlab histogram object given what I have?
1 commentaire
Tom Mozdzen
le 22 Déc 2020
Réponse acceptée
Plus de réponses (1)
Steven Lord
le 23 Déc 2020
0 votes
I'm analyzing timestamps from a single photon detector. I populate the bins as I go. In 1 second of data collection, I have nearly 25 million timestamps. My file is huge as it runs for about an hour. So I'd have around 20x10^9 items in my data file if I saved each data point. )-:
That sounds like it could be Big Data. Can you store the data as a tall array backed by a datastore array, perhaps a tabularTextDatastore or a spreadsheetDatastore? You can create a histogram using that tall array. See this documentation page for more information.
1 commentaire
Tom Mozdzen
le 23 Déc 2020
Catégories
En savoir plus sur Histograms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


