function definition and help file made coherent + unit test added
[scilab.git] / scilab / modules / cacsd / help / en_US / calfrq.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA - 
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry version="5.0-subset Scilab" xml:id="calfrq" xml:lang="en"
14           xmlns="http://docbook.org/ns/docbook"
15           xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg"
17           xmlns:ns4="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML"
19           xmlns:db="http://docbook.org/ns/docbook">
20   <info>
21     <pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (Wed, 26 Mar 2008)
22     $</pubdate>
23   </info>
24
25   <refnamediv>
26     <refname>calfrq</refname>
27
28     <refpurpose>frequency response discretization</refpurpose>
29   </refnamediv>
30
31   <refsynopsisdiv>
32     <title>Calling Sequence</title>
33
34     <synopsis>[frq,bnds,split]=calfrq(h,fmin,fmax)</synopsis>
35   </refsynopsisdiv>
36
37   <refsection>
38     <title>Parameters</title>
39
40     <variablelist>
41       <varlistentry>
42         <term>h</term>
43
44         <listitem>
45           <para>Linear system in state space or transfer representation
46           (<literal>see <link linkend="syslin">syslin</link></literal>)</para>
47         </listitem>
48       </varlistentry>
49
50       <varlistentry>
51         <term>fmin,fmax</term>
52
53         <listitem>
54           <para>real scalars (min and max frequencies in Hz)</para>
55         </listitem>
56       </varlistentry>
57
58       <varlistentry>
59         <term>frq</term>
60
61         <listitem>
62           <para>row vector (discretization of the frequency interval)</para>
63         </listitem>
64       </varlistentry>
65
66       <varlistentry>
67         <term>bnds</term>
68
69         <listitem>
70           <para>vector <literal>[Rmin Rmax Imin Imax]</literal> where
71           <literal>Rmin</literal> and <literal>Rmax</literal> are the lower
72           and upper bounds of the frequency response real part,
73           <literal>Imin</literal> and <literal>Imax</literal> are the lower
74           and upper bounds of the frequency response imaginary part,</para>
75         </listitem>
76       </varlistentry>
77
78       <varlistentry>
79         <term>split</term>
80
81         <listitem>
82           <para>vector of frq splitting points indexes</para>
83         </listitem>
84       </varlistentry>
85     </variablelist>
86   </refsection>
87
88   <refsection>
89     <title>Description</title>
90
91     <para>frequency response discretization; <literal>frq</literal> is the
92     discretization of <literal>[fmin,fmax]</literal> such that the peaks in
93     the frequency response are well represented.</para>
94
95     <para>Singularities are located between <literal>frq(split(k)-1)</literal>
96     and <literal>frq(split(k))</literal> for <literal>k&gt;1</literal>.</para>
97   </refsection>
98
99   <refsection>
100     <title>Examples</title>
101
102     <programlisting role="example">
103
104 s=poly(0,'s')
105 h=syslin('c',(s^2+2*0.9*10*s+100)/(s^2+2*0.3*10.1*s+102.01))
106 h1=h*syslin('c',(s^2+2*0.1*15.1*s+228.01)/(s^2+2*0.9*15*s+225)) 
107 [f1,bnds,spl]=calfrq(h1,0.01,1000);
108 rf=repfreq(h1,f1);
109 plot2d(real(rf)',imag(rf)')
110  
111   </programlisting>
112   </refsection>
113
114   <refsection>
115     <title>See Also</title>
116
117     <simplelist type="inline">
118       <member><link linkend="bode">bode</link></member>
119
120       <member><link linkend="black">black</link></member>
121
122       <member><link linkend="nyquist">nyquist</link></member>
123
124       <member><link linkend="freq">freq</link></member>
125
126       <member><link linkend="repfreq">repfreq</link></member>
127
128       <member><link linkend="logspace">logspace</link></member>
129     </simplelist>
130   </refsection>
131 </refentry>