1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="yulewalk">
4 <refname>yulewalk</refname>
5 <refpurpose> least-square filter design</refpurpose>
8 <title>Calling Sequence</title>
9 <synopsis>Hz = yulewalk(N,frq,mag)</synopsis>
12 <title>Arguments</title>
17 <para>integer (order of desired filter)</para>
23 <para>real row vector (non-decreasing order), frequencies.</para>
29 <para>non negative real row vector (same size as frq), desired magnitudes.</para>
36 filter <literal>B(z)/A(z)</literal>
43 <title>Description</title>
45 Hz = yulewalk(N,frq,mag) finds the N-th order iir filter
47 <programlisting role="no-scilab-exec"><![CDATA[
49 B(z) b(1)z + b(2)z + .... + b(n)
50 H(z)= ---- = ---------------------------------
52 A(z) z + a(2)z + .... + a(n)
55 which matches the magnitude frequency response given by vectors frq and mag.
56 Vectors frq and mag specify the frequency and magnitude of the desired
57 frequency response. The frequencies in frq must be between 0.0 and 1.0,
58 with 1.0 corresponding to half the sample rate. They must be in
59 increasing order and start with 0.0 and end with 1.0.
63 <title>Examples</title>
64 <programlisting role="example"><![CDATA[
65 f=[0,0.4,0.4,0.6,0.6,1];
73 xtitle('Desired Frequency Response (Magnitude)')
74 [frq,repf]=repfreq(Hz,0:0.001:0.5);
77 plot2d(fs*frq',abs(repf'));
78 xtitle('Obtained Frequency Response (Magnitude)')
81 f=[0,0.4,0.4,0.6,0.6,1];
89 xtitle('Desired Frequency Response (Magnitude)')
90 [frq,repf]=repfreq(Hz,0:0.001:0.5);
93 f=[0,0.4,0.4,0.6,0.6,1];
98 [frq,repf]=repfreq(Hz,0:0.001:0.5);
99 plot2d(fs*frq',abs(repf'));
100 xtitle('Obtained Frequency Response (Magnitude)')