How does one plot a histogram from the histogram counts?
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have produced an array of counts, specifically produced with:
histcounts
the reason I do this is because storing the actual data is way to expensive in terms of storage. So on the fly I update my histcount. Now that I have them, how do I plot the histogram?
----
demo code:
W_hist_counts = zeros(1,D);
for i=2:iter+1
W = get_vector_we_want_stats(W)
%
W_hist_counts = W_hist_counts + histcounts(W,nbins);
end
----
0 comentarios
Respuestas (2)
the cyclist
el 27 de Mzo. de 2017
4 comentarios
the cyclist
el 28 de Mzo. de 2017
I assume you want to normalize to an overall sum of 1. You should just be able to plot
W_hist_counts/sum(W_hist_counts)
to normalize, right?
Image Analyst
el 27 de Mzo. de 2017
histogram() can plot the histogram data (counts vs values) if you pass in the counts and values instead of the data. Otherwise you can do it manually with bar().
0 comentarios
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!