* Bug 12862 fixed: intsplin(x,y) ignored imag(y)
[scilab.git] / scilab / modules / differential_equations / help / en_US / intsplin.xml
index 229e4af..7625cc7 100644 (file)
@@ -1,14 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="intsplin" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
+          xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+          xmlns:scilab="http://www.scilab.org" xml:id="intsplin" xml:lang="en">
     <refnamediv>
         <refname>intsplin</refname>
-        <refpurpose>integration of experimental data by spline
-            interpolation
+        <refpurpose>integration of experimental data by spline interpolation
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
-        <synopsis>v = intsplin([x,] s)</synopsis>
+        <synopsis>
+          v = intsplin(y)
+          v = intsplin(x, y)
+        </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
                 <term>x</term>
                 <listitem>
                     <para>
-                        vector of increasing <literal>x</literal> coordinate data.
-                        Default value is <literal>1:size(y,'*')</literal>.
+                        Vector of increasing real abscissae. It must have the length of
+                        <literal>y</literal>. Default values are <literal>1:size(y,'*')</literal>.
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>s</term>
+                <term>y</term>
                 <listitem>
                     <para>
-                        vector of <literal>y</literal> coordinate data.
+                        vector of real or complex ordinates.
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>v</term>
                 <listitem>
-                    <para>value of the integral.</para>
+                    <para>value of the integral. If <literal>y</literal> are complex numbers, the
+                      real and imaginary parts are integrated separately.
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
     </refsection>
     <refsection>
         <title>Description</title>
-        <para>–°omputes :</para>
         <para>
-            Where <literal>f</literal> is a function described by a set of experimental
-            value:
+            Let <literal>f</literal> be a function defined at some given sampled experimental points
+            <literal>(xi, yi=f(xi))</literal>.
+        </para>
+        <para>
+          <function>intsplin</function> computes an approximate of <literal>integral{f(x).dx}</literal>
+          from <literal>x0=x(1)</literal> to <literal>x1=x($)</literal>.
         </para>
         <para>
-            <literal>s(i)=f(x(i))</literal> and <literal>x0=x(1)</literal>,
-            <literal>x1=x(n)</literal>.
+            Between given points, <literal>f</literal> is approximated using a spline interpolation.
         </para>
-        <para>Between mesh points function is interpolated using spline's.</para>
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-t=0:0.1:%pi
+t = 0:0.1:%pi
 intsplin(t,sin(t))
- ]]></programlisting>
+
+intsplin(1:5)            // 12
+
+x = 0:0.1:0.4;
+intsplin(x, 1:5)         // 1.2
+
+intsplin((1:5)*%i)       // 12i
+intsplin(x, (1:5)*%i)    // 1.2i
+intsplin(x, x+(1:5)*%i)  // 0.08 + 1.2i
+]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>