Normalize a histogram modification
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
What do I need to put in to normalize the distribution?
function y = mkhist(lambda, n_mea, n_smpls_per_mea)
%program to fix up histogram (normalization, etc) and
%prepare plots with both histogram and the analytical PDF
%called AFTER a call to 'run'
global xacc hist bin_range bin_size n_bins midpt x exact_pdf
% normalize histogram (histnorm_inv is INVERSE of normalization):
histnorm_inv = 1.
% ^^^^^^^^ <-- MODIFY -- fill in correct form
hist = hist.*histnorm_inv
% Calculate the exact distribution for comparison
x=0:bin_size:bin_range+bin_size
exact_pdf = exp(-x/lambda)/lambda
end
1 comentario
Jan
el 2 de Oct. de 2017
Editada: Jan
el 2 de Oct. de 2017
This is the 3rd thread concerning the same problem. This starts to be confusing. Usually the readers in the forum tends to ignore confusing threads, so better concentrate on one thread and answer the question for clarifications. This is easier for the readers and increases your chance to get an answer.
Respuestas (0)
Ver también
Categorías
Más información sobre Histograms en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!