Main Content

gausswin

가우스 윈도우

설명

예제

w = gausswin(L)L개 점을 갖는 가우스 윈도우를 반환합니다.

w = gausswin(L,alpha)는 폭 인자가 alpha인, L개 점을 갖는 가우스 윈도우를 반환합니다.

참고

윈도우가 잘린 것처럼 보이면 점의 개수 L을 늘리십시오.

예제

모두 축소

64개 점을 갖는 가우스 윈도우를 생성합니다. wvtool로 결과를 표시합니다.

L = 64;
wvtool(gausswin(L))

Figure Window Visualization Tool contains 2 axes objects and other objects of type uimenu, uitoolbar, uipanel. Axes object 1 with title Time domain, xlabel Samples, ylabel Amplitude contains an object of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains an object of type line.

이 예제에서는 가우스 윈도우의 푸리에 변환이 역수 표준편차를 갖는 가우스 윈도우임을 보여줍니다. 이는 시간-주파수 불확정성 원리를 설명합니다.

gausswin과 정의 방정식을 사용하여 길이가 N=64인 가우스 윈도우를 생성합니다. α=8로 설정합니다. 그러면 표준편차가 (N-1)/2α=63/16이 됩니다. 가우스 윈도우는 기본적으로 평균에서 3 표준편차를 더하거나 뺀 값으로 제한됩니다. 즉, 대략 [–12, 12]가 지원됩니다.

N = 64;
n = -(N-1)/2:(N-1)/2;
alpha = 8;

w = gausswin(N,alpha);

stdev = (N-1)/(2*alpha);
y = exp(-1/2*(n/stdev).^2);

plot(n,w)
hold on
plot(n,y,".")
hold off

xlabel("Samples")
title("Gaussian Window, N = "+N)
legend(["gausswin" "Definition"])

Figure contains an axes object. The axes object with title Gaussian Window, N = 64, xlabel Samples contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent gausswin, Definition.

4N=256개 점으로 가우스 윈도우의 푸리에 변환을 구합니다. fftshift를 사용하여 푸리에 변환의 중심을 영주파수(DC)에 둡니다.

nfft = 4*N;
freq = -pi:2*pi/nfft:pi-pi/nfft;

wdft = fftshift(fft(w,nfft));

가우스 윈도우의 푸리에 변환은 시간 영역 표준편차의 역수를 표준편차로 갖는 가우스 윈도우이기도 합니다. 계산에 가우스 정규화 인자를 포함시킵니다.

ydft = exp(-1/2*(freq/(1/stdev)).^2)*(stdev*sqrt(2*pi));

plot(freq/pi,abs(wdft))
hold on
plot(freq/pi,abs(ydft),".")
hold off

xlabel("Normalized frequency (\times\pi rad/sample)")
title("Fourier Transform of Gaussian Window")
legend(["fft" "Definition"])

Figure contains an axes object. The axes object with title Fourier Transform of Gaussian Window, xlabel Normalized frequency ( times pi blank rad/sample) contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent fft, Definition.

입력 인수

모두 축소

윈도우 길이로, 양의 정수로 지정됩니다.

데이터형: single | double

폭 인자로, 양의 실수형 스칼라로 지정됩니다. alpha는 윈도우의 폭에 반비례합니다.

데이터형: single | double

출력 인수

모두 축소

가우스 윈도우로, 열 벡터로 반환됩니다.

알고리즘

가우스 윈도우의 계수는 다음 방정식으로 계산됩니다.

w(n)=e12(αn(L1)/2)2=en2/2σ2,

여기서 –(L–1)/2≤n≤(L–1)/2이고 α는 가우스 확률 변수의 표준편차 σ에 반비례합니다. 가우스 확률 밀도 함수 표준편차의 정확한 대응 관계는 σ = (L – 1)/(2α)입니다.

참고 문헌

[1] Hansen, Eric W. Fourier Transforms: Principles and Applications. New York: John Wiley & Sons, 2014.

[2] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. Upper Saddle River, NJ: Prentice Hall, 1999.

확장 기능

C/C++ 코드 생성
MATLAB® Coder™를 사용하여 C 코드나 C++ 코드를 생성할 수 있습니다.

버전 내역

R2006a 이전에 개발됨