Effacer les filtres
Effacer les filtres

Finding the Y values corresponding to histogram center

11 vues (au cours des 30 derniers jours)
Dhanuja Elizabeth Thomas
Dhanuja Elizabeth Thomas le 4 Juil 2016
Modifié(e) : José-Luis le 4 Juil 2016
Hi, I'm using the function [counts,centers] = hist(xxx,100) for histogram plot. Here centers gives the center value of each bin on X axis but I want its corresponding Y value. How can I find the Y value of each bin center of histogram ?

Réponses (2)

Walter Roberson
Walter Roberson le 4 Juil 2016
The Y value will be the counts value corresponding to the center you are interested in.

José-Luis
José-Luis le 4 Juil 2016
  2 commentaires
Dhanuja Elizabeth Thomas
Dhanuja Elizabeth Thomas le 4 Juil 2016
Sorry, I didn't get how it extracts the Y axis value of each bin center.
José-Luis
José-Luis le 4 Juil 2016
Modifié(e) : José-Luis le 4 Juil 2016
What Walter said. The Y value is the number of values or N in histcounts(). I you want the frequency, divide by the total number of values.
You might want to have a look at ksdensity() as well.

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by