Navigation

Operators and Keywords

Function List:

C++ API

freqz.m File Reference


Functions

 elseif (nargin==1) a
 if (!ischar(region)&&!isempty(region)) Fs
endif endif if (isempty(b)) b
endif if (isempty(a)) a
endif if (isempty(n)) n
endif if (isempty(region)) if(isreal(b)&&isreal(a)) region
endif endif if (isempty(Fs)) if(nargout
 if (!isscalar(n)) w
 if (nargin==4) w
 if (k > n/2 &&nargout==0) n
endif if (strcmp(region,"whole")) N
 if (nargout!=0) h_r
else freqz_plot (f, h)
 !assert (h(1), 1, 10 *eps)
 !assert (abs(h(17)).^2, 0.5, 10 *eps)
 !assert (h, freqz(b, a, w), 10 *eps)
 !assert (h(2:16), conj(h(32:-1:18)), 20 *eps)
 !assert (h(1:16), h2, 20 *eps)
 !assert (w(1:16), w2, 20 *eps)
 !assert (f,[0:15]'*10, 10 *eps)
 !assert (f2,[0:15]*10, 10 *eps)
 !assert (h, h2.', 20 *eps)
 !assert (f3,[0:31]'*10, 10 *eps)

Variables

 function [h_r, f_r]
 region = []
else Fs = 2*pi
endif endif a = a(:)
 b = b(:)
endif k = max (length (b), length (a))
 hb = polyval (postpad (b, k), exp (j*w))
 ha = polyval (postpad (a, k), exp (j*w))
else N = 2*n
endif f = Fs * (0:n-1).' / N
 pad_sz = N*ceil (k/N)
for i
endfor endif h = hb ./ ha
 f_r = f
endif endfunction!test !b = [0.292893218813452 0.585786437626905 0.292893218813452]
 !a = [1 0 0.171572875253810]

Function Documentation

!assert ( f3  ,
[0:31] '*  10,
10 *  eps 
)

!assert ( ,
h2.'  ,
20 *  eps 
)

!assert ( f2  ,
[0:15] *  10,
10 *  eps 
)

!assert ( ,
[0:15] '*  10,
10 *  eps 
)

!assert ( w(1:16)  ,
w2  ,
20 *  eps 
)

!assert ( h(1:16)  ,
h2  ,
20 *  eps 
)

!assert ( h(2:16)  ,
conj(h(32:-1:18))  ,
20 *  eps 
)

!assert ( ,
freqz(b, a, w)  ,
10 *  eps 
)

!assert ( abs(h(17)).^  2,
0.  5,
10 *  eps 
)

!assert ( h(1)  ,
,
10 *  eps 
)

elseif ( nargin  = =1  ) 

else freqz_plot ( ,
 
)

if ( nargout!  = 0  ) 

endif if ( strcmp(region,"whole")   ) 

if ( k  ,
n/2 &&  nargout = =0 
)

if ( nargin  = =4  ) 

if ( isscalarn  ) 

endif endif if ( isempty(Fs  ) 

endif if ( isempty(region  ) 

endif if ( isempty(n)   ) 

endif if ( isempty(a)   ) 

endif endif if ( isempty(b)   ) 

if ( ischarregion)&&!isempty(region  ) 


Variable Documentation

!a = [1 0 0.171572875253810]

!test !b = [0.292893218813452 0.585786437626905 0.292893218813452]

a = a(:)

b = b(:)

endif f = Fs * (0:n-1).' / N

f_r = f

else Fs = 2*pi

function[h_r, f_r]

Initial value:

 freqz (b, a, n, region, Fs)

  if (nargin < 1 || nargin > 5)
    print_usage ()

endfor endif h = hb ./ ha

ha = polyval (postpad (a, k), exp (j*w))

hb = polyval (postpad (b, k), exp (j*w))

for i

Initial value:

 1:N:pad_sz
      hb = hb + fft (postpad (b(i:i+N-1), N))(1:n)

else k = max (length (b), length (a))

else N = 2*n

pad_sz = N*ceil (k/N)

else region = []