Main Content

triang

설명

예제

w = triang(L)L개 점을 갖는 삼각 윈도우를 반환합니다.

예제

모두 축소

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

L = 200;
w = triang(L);
wvtool(w)

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.

입력 인수

모두 축소

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

데이터형: single | double

출력 인수

모두 축소

삼각 윈도우로, 열 벡터로 반환됩니다.

알고리즘

삼각 윈도우의 계수는 다음과 같습니다.

L이 홀수인 경우:

w(n)={2nL+11nL+1222nL+1L+12+1nL

L이 짝수인 경우:

w(n)={(2n1)L1nL22(2n1)LL2+1nL

참고 문헌

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