Normalize a histogram modification
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Jan
2017년 10월 2일
편집: Jan
2017년 10월 2일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!