GUI demos: resize and rename deprecated rendering demo
[scilab.git] / scilab / modules / graphics / help / en_US / 2d_plot / paramfplot2d.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.1-en.txt
11  *
12  -->
13 <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="paramfplot2d">
14     <refnamediv>
15         <refname>paramfplot2d</refname>
16         <refpurpose>animated plot of a 2D parametrized curve.</refpurpose>
17     </refnamediv>
18     <refsynopsisdiv>
19         <title>Calling Sequence</title>
20         <synopsis>paramfplot2d(f,x,theta)
21             paramfplot2d(f,x,theta,flag)
22             paramfplot2d(f,x,theta,flag,rect)
23         </synopsis>
24     </refsynopsisdiv>
25     <refsection>
26         <title>Arguments</title>
27         <variablelist>
28             <varlistentry>
29                 <term>x</term>
30                 <listitem>
31                     <para>real vector.</para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>f</term>
36                 <listitem>
37                     <para>
38                         function <literal>y=f(x,t)</literal> . f is a Scilab function or a dynamically linked routine (referred to as a string).
39                     </para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>theta</term>
44                 <listitem>
45                     <para>real vector (set of parameters).</para>
46                 </listitem>
47             </varlistentry>
48             <varlistentry>
49                 <term>flag</term>
50                 <listitem>
51                     <para>
52                         string <literal>'no'</literal> or <literal>'yes'</literal>: If "yes" screen is not cleared  between two consecutive plots.
53                     </para>
54                 </listitem>
55             </varlistentry>
56             <varlistentry>
57                 <term>rect</term>
58                 <listitem>
59                     <para>"rectangle" [xmin, xmax, ymin, ymax] (1 x 4 real vector),</para>
60                 </listitem>
61             </varlistentry>
62         </variablelist>
63     </refsection>
64     <refsection>
65         <title>Description</title>
66         <para>
67             Animated plot of the function <literal>x</literal>,
68             <literal>t</literal>--&gt;<literal>f(x,t)</literal> for
69             <literal>t=theta(1),theta(2),etc</literal>.  <literal>f</literal>
70             can be a either Scilab function or a dynamically linked routine
71             since <literal>y=f(x,t)</literal> is evaluated as
72             <literal>y=feval(x(:),t,f)</literal>. See <link linkend="feval">feval</link>.
73         </para>
74         <para>
75             <literal>f</literal> is a mapping <literal>x</literal>,
76             <literal>t</literal>--&gt; <literal>f(x,t) = R^N</literal> valued
77             function for <literal>x</literal> a vector of
78             <literal>R^N</literal> and <literal>t</literal> a real number.
79         </para>
80     </refsection>
81     <refsection>
82         <title>Examples</title>
83         <programlisting role="example"><![CDATA[ 
84 deff('y=f(x,t)','y=t*sin(x)')
85 x=linspace(0,2*%pi,50);
86 theta=0:0.05:1;
87 clf;paramfplot2d(f,x,theta);
88  ]]></programlisting>
89         <programlisting role="example"><![CDATA[ 
90 function V=twosoliton(x,t)
91   a1=6;s1=2;v1=a1^2;
92   a2=4;s2=40;v2=a2^2;
93   
94   f1=exp(-a1*(x-s1-v1*t));
95   f2=exp(-a2*(x-s2-v2*t));
96   r=((a2-1)/(a2+a1))^2;
97   V=2*(v1*f1+v2*f2+2*(a2-a1)^2*f1.*f2+r*(v2*(f1^2).*f2+v1*f1.*(f2^2)))./((1+f1+f2+r*f1.*f2)^2);
98 endfunction
99 x=linspace(1,100,3000);
100 clf;paramfplot2d(twosoliton,x,0:0.05:3);
101  ]]></programlisting>
102     </refsection>
103     <refsection role="see also">
104         <title>See Also</title>
105         <simplelist type="inline">
106             <member>
107                 <link linkend="comet">comet</link>
108             </member>
109             <member>
110                 <link linkend="plot2d">plot2d</link>
111             </member>
112             <member>
113                 <link linkend="feval">feval</link>
114             </member>
115             <member>
116                 <link linkend="fplot2d">fplot2d</link>
117             </member>
118         </simplelist>
119     </refsection>
120 </refentry>