필터 지우기
필터 지우기

scaling for periodic signal using hann window

조회 수: 4 (최근 30일)
Lisa Justin
Lisa Justin 2012년 3월 13일
How can i scale for periodic signal using hann window. i know for flattop i.e 1/sum(window)but i do not know how to scale with hann window with a periodic signal. kindly help
  댓글 수: 1
Lisa Justin
Lisa Justin 2012년 3월 13일
xn=signal;%%%periodic signal
w=flattopwin(length(xn));
x=xn.*w;
sc=1/sum(w);%%%%scaling
y=(fft(x)).*sc
please how would i scale if i want to usse hann window instead. what would 'sc' be?

댓글을 달려면 로그인하십시오.

채택된 답변

Wayne King
Wayne King 2012년 3월 13일
Hi Lisa, it should be the same:
t = 0:0.001:1-0.001;
xn = cos(2*pi*100*t);
w = hanning(length(xn));
x = xn'.*w;
sc = 1/sum(w);
xdft = fft(xn);
xdft = xdft(1:length(xn)/2+1);
y = sc*xdft;
plot(abs(y));
  댓글 수: 3
Lisa Justin
Lisa Justin 2012년 3월 13일
the signal is periodic remember
Wayne King
Wayne King 2012년 3월 13일
It's not the same as the flat top window, because the sum of the two windows is not the same.
w = hanning(length(xn));
w1 = flattopwin(length(xn));
sum(w)
sum(w1)
Accordingly the reciprocal of the sums is not the same.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by