Typo fixes
[scilab.git] / scilab / modules / signal_processing / help / en_US / frfit.xml
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="frfit">
3     <refnamediv>
4         <refname>frfit</refname>
5         <refpurpose>frequency response fit</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>sys=frfit(w,fresp,order)
10             [num,den]=frfit(w,fresp,order)
11             sys=frfit(w,fresp,order,weight)
12             [num,den]=frfit(w,fresp,order,weight)
13         </synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>w</term>
20                 <listitem>
21                     <para>positive real vector of frequencies (Hz)</para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>fresp</term>
26                 <listitem>
27                     <para>
28                         complex vector of frequency responses (same size as <literal>w</literal>)
29                     </para>
30                 </listitem>
31             </varlistentry>
32             <varlistentry>
33                 <term>order</term>
34                 <listitem>
35                     <para>
36                         integer (required order, degree of <literal>den</literal>)
37                     </para>
38                 </listitem>
39             </varlistentry>
40             <varlistentry>
41                 <term>weight</term>
42                 <listitem>
43                     <para>
44                         positive real vector (default value <literal>ones(w)</literal>).
45                     </para>
46                 </listitem>
47             </varlistentry>
48             <varlistentry>
49                 <term>num,den</term>
50                 <listitem>
51                     <para>stable polynomials</para>
52                 </listitem>
53             </varlistentry>
54         </variablelist>
55     </refsection>
56     <refsection>
57         <title>Description</title>
58         <para>
59             <literal>sys=frfit(w,fresp,order,weight)</literal> returns a bi-stable transfer function
60             <literal>G(s)=sys=num/den</literal>, of of given <literal>order</literal> such that 
61             its frequency response <literal>G(w(i))</literal> matches <literal>fresp(i)</literal>, i.e.
62             <literal>freq(num,den,%i*w)</literal> should be close to <literal>fresp</literal>.
63             <literal>weight(i)</literal> is the weight given to <literal>w(i)</literal>.
64         </para>
65     </refsection>
66     <refsection>
67         <title>Examples</title>
68         <programlisting role="example"><![CDATA[ 
69 w=0.01:0.01:2;
70 s=poly(0,'s');
71 G=syslin('c',2*(s.^2+0.1*s+2), (s.^2+s+1)*(s.^2+0.3*s+1));
72 fresp=repfreq(G,w);
73 Gid=frfit(w,fresp,4);
74 frespfit=repfreq(Gid,w);
75 bode(w,[fresp;frespfit])
76  ]]></programlisting>
77         <scilab:image>
78             w=0.01:0.01:2;
79             s=poly(0,'s');
80             G=syslin('c',2*(s.^2+0.1*s+2), (s.^2+s+1)*(s.^2+0.3*s+1));
81             fresp=repfreq(G,w);
82             Gid=frfit(w,fresp,4);
83             frespfit=repfreq(Gid,w);
84             bode(w,[fresp;frespfit])
85         </scilab:image>
86     </refsection>
87     <refsection role="see also">
88         <title>See Also</title>
89         <simplelist type="inline">
90             <member>
91                 <link linkend="frep2tf">frep2tf</link>
92             </member>
93             <member>
94                 <link linkend="factors">factors</link>
95             </member>
96             <member>
97                 <link linkend="cepstrum">cepstrum</link>
98             </member>
99             <member>
100                 <link linkend="mrfit">mrfit</link>
101             </member>
102             <member>
103                 <link linkend="freq">freq</link>
104             </member>
105             <member>
106                 <link linkend="calfrq">calfrq</link>
107             </member>
108         </simplelist>
109     </refsection>
110 </refentry>