필터 지우기
필터 지우기

what is function of [ ] in this code

조회 수: 2 (최근 30일)
moonman
moonman 2011년 10월 21일
Here is the code
h1336=[];
L=50;
fs=8000;
fb=1336;
h1336 = (2/L)*cos(2*pi*fb*(0:L-1)/fs);
[H,F] = freqz(h1336,1,[],fs);
What does this bracket [ ] do in freqz command

채택된 답변

Wayne King
Wayne King 2011년 10월 21일
It says "use the default value for the input N, the number of frequency points".
in freqz() that is 512.
So
[H,F] = freqz(h1336,1,[],fs);
is the same as:
[H,F] = freqz(h1336,1,512,fs);

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 10월 21일
If you do not specify the integer n, or you specify it as the empty vector [], the frequency response is calculated using the default value of 512 samples.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by