1
yulewalk Scilab Group Scilab Function yulewalk
3
yulewalk - least-square filter design
6
Hz = yulewalk(N,frq,mag)
8
N : integer (order of desired filter)
10
frq : real row vector (non-decreasing order), frequencies.
12
mag : non negative real row vector (same size as frq), desired
18
Hz = yulewalk(N,frq,mag) finds the N-th order iir filter
21
B(z) b(1)z + b(2)z + .... + b(n)
22
H(z)= ---- = ---------------------------------
24
A(z) z + a(2)z + .... + a(n)
25
which matches the magnitude frequency response given by vectors frq and
26
mag. Vectors frq and mag specify the frequency and magnitude of the
27
desired frequency response. The frequencies in frq must be between 0.0
28
and 1.0, with 1.0 corresponding to half the sample rate. They must be in
29
increasing order and start with 0.0 and end with 1.0.
32
f=[0,0.4,0.4,0.6,0.6,1];H=[0,0,1,1,0,0];Hz=yulewalk(8,f,H);
34
xbasc(0);xset('window',0);plot2d(fhz',H');
35
xtitle('Desired Frequency Response (Magnitude)')
36
[frq,repf]=repfreq(Hz,0:0.001:0.5);
37
xbasc(1);xset('window',1);plot2d(fs*frq',abs(repf'));
38
xtitle('Obtained Frequency Response (Magnitude)')