export frequency data from a histogram
31 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi there, I have a histogram that looks like this:
![histogram.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214244/histogram.png)
and I would like to extract the frequency data (y-data) so I can make a seperate plot with points.
Any help would bge much appreciated
Many thanks
0 commentaires
Réponse acceptée
Star Strider
le 16 Avr 2019
Use a handle to return the information from the histogram function, then get the values you want:
figure
hh = histogram(x);
edges = hh.BinEdges;
counts = hh.BinCounts;
values = hh.Values;
5 commentaires
James Hughes
le 26 Nov 2020
What's the difference between BinCounts and Values? They seem to be the same.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Histograms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!