Main Content

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

hamming

설명

예제

w = hamming(L)L개 점을 갖는 대칭형 해밍 윈도우를 반환합니다.

예제

w = hamming(L,sflag)sflag로 지정된 윈도우 샘플링을 사용하여 해밍 윈도우를 반환합니다.

예제

모두 축소

64개 점을 갖는 해밍 윈도우를 생성합니다. wvtool을 사용하여 결과를 표시합니다.

L = 64;
wvtool(hamming(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.

다음과 같은 두 개의 해밍 윈도우를 설계합니다.

  • 첫 번째 윈도우는 N = 64이고 대칭형임.

  • 두 번째 윈도우는 N = 63이고 주기적임.

두 윈도우를 표시합니다.

Hs = hamming(64,'symmetric');
Hp = hamming(63,'periodic');
wvt = wvtool(Hs,Hp);
legend(wvt.CurrentAxes,'Symmetric','Periodic')

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 2 objects of type line. Axes object 2 with title Frequency domain, xlabel Normalized Frequency (\times\pi rad/sample), ylabel Magnitude (dB) contains 2 objects of type line. These objects represent Symmetric, Periodic.

입력 인수

모두 축소

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

데이터형: single | double

윈도우 샘플링 방법으로, 다음과 같이 지정됩니다.

  • 'symmetric' — 필터 설계에 윈도우를 사용할 경우 이 옵션을 사용합니다.

  • 'periodic' — 이 옵션은 윈도우가 적용된 신호가 이산 푸리에 변환에서 묵시적인 완벽한 주기적 확장을 이루도록 하기 때문에, 스펙트럼 분석에 유용합니다. 'periodic'이 지정되면 이 함수는 길이가 L + 1인 윈도우를 계산하고 처음 L개 점을 반환합니다.

출력 인수

모두 축소

해밍 윈도우로, 열 벡터로 반환됩니다.

알고리즘

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

w(n)=0.540.46cos(2πnN),0nN.

윈도우 길이 L은 N + 1과 같습니다.

참고 문헌

[1] 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 이전에 개발됨