Normalize a histogram modification

1 回表示 (過去 30 日間)
Gaëtan Poirier
Gaëtan Poirier 2017 年 10 月 2 日
編集済み: Jan 2017 年 10 月 2 日
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
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 ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by