フィルターのクリア

ヒストグラムからノイズの算出方法

5 ビュー (過去 30 日間)
Naoki Ishibashi
Naoki Ishibashi 2016 年 9 月 20 日
コメント済み: michio 2016 年 9 月 21 日
matlabで以下の様なヒストグラムを作成し、近似曲線を引きました。そこからノイズを算出したいのですが方法ありました教えてください。
以下作成したプログラムになります。
nbins = 18;
total_counts = zeros(1,nbins);
for i = 1:31
if i<10
daystr = ['0', num2str(i)];
else
daystr = num2str(i);
end
for k = 0:7
j = 3*k;
if j<10
hour = ['0', num2str(j)];
else
hour = num2str(j);
end
filename = ['TS2004.07.',daystr,'.',hour,'00.txt'];
y = load(filename);
x = y(y<330 & y>260);
[counts,edges] = histcounts(x,nbins, 'Normalization', 'pdf');
total_counts = total_counts + counts;
end
end
center = (edges(1:end-1)+edges(2:end))/2;
bar(center,total_counts,1);
アドバイスいただければ幸いです。
  1 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 9 月 20 日
Google translation:
Title: The method of calculating the noise from the histogram
In a histogram such as the following , it drew the approximate curve . Please tell me I want to calculate the noise from there there was method .
histogram image
It will be on the program that was created following
code
If it is possible advice we hope

サインインしてコメントする。

回答 (1 件)

michio
michio 2016 年 9 月 21 日
ここでの「ノイズ」はどう定義されますでしょうか。 ビン数に依存する指標ではありますが、ヒストグラムの近似曲線(確率密度関数?)からのずれということであれば、近似曲線のビンの中央での値との差で計算できます。
もしデータが正規分布かどうか見極めるということであれば、尖度などの高次モーメントも指標になるかと思いますし、 分布プロット にも幾つか他の例が紹介されています。
  2 件のコメント
Naoki Ishibashi
Naoki Ishibashi 2016 年 9 月 21 日
ご解答ありがとうございます。 ノイズに関する自分の理解が曖昧ですのでノイズと言っていいのかわからないのですが、自分が求めたいものは近似曲線からのずれです。 ご解答いただいた近似曲線のビンの中央での値との差についてもう少し詳しく教えていただけると幸いです。
michio
michio 2016 年 9 月 21 日
fitdist 関数で正規分布近似し、ビンの中央 center での分布確率の差を計算した例を記載しますが、、いかがでしょうか。複数回分のカウント数を足し合わせた total_counts の場合は、ファイル数で割るなどの処理が追加で必要かもしれませんので、注意してください。
x = randn(10000,1);
[total_counts,edges] = histcounts(x,'normalization','pdf');
center = (edges(1:end-1)+edges(2:end))/2;
bar(center,total_counts,1);
distribution = fitdist(x,'normal');
y_dist = pdf(pd,center);
difference = y_dist - total_counts
plot(total_counts)
hold on
plot(y_dist)
hold off

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by