Scilab Function
Last update : 1/11/2005

mtlb_freqz - Z-transform digital filter frequency response

Calling Sequence

[h,w] = mtlb_freqz(b,a,n)

Parameters

Description

[H,W]=mtlb_freqz(B,A,N) returns the N-point frequency vector W and the N-point complex frequency response vector G of the filter B/A: given numerator and denominator coefficients in vectors B and A. The frequency response is evaluated at N points equally spaced around the upper half of the unit circle.

This function has been imported from MatLab and one or two improvements for SciLab has been done.

Examples

[B,A]=butter(8,0.25);
[H,W]=freqz(B,A,256);
f=gcf();
subplot(211);
plot2d(W,abs(H),style=3);
subplot(212);
plot2d(W,atan(imag(H) ./real(H)),style=3);
disp(length(H));

See Also

mtlb_filter ,   butter ,  

Authors

Dr. Andreas Geissler geisslea@web.de