MATLAB: What is function of [ ] in this code

freqz

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

Best Answer

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);