* Bug 12862 fixed: intsplin(x,y) ignored imag(y)
[scilab.git] / scilab / modules / differential_equations / help / en_US / intsplin.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"
3           xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
4           xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
5           xmlns:scilab="http://www.scilab.org" xml:id="intsplin" xml:lang="en">
6     <refnamediv>
7         <refname>intsplin</refname>
8         <refpurpose>integration of experimental data by spline interpolation
9         </refpurpose>
10     </refnamediv>
11     <refsynopsisdiv>
12         <title>Syntax</title>
13         <synopsis>
14           v = intsplin(y)
15           v = intsplin(x, y)
16         </synopsis>
17     </refsynopsisdiv>
18     <refsection>
19         <title>Arguments</title>
20         <variablelist>
21             <varlistentry>
22                 <term>x</term>
23                 <listitem>
24                     <para>
25                         Vector of increasing real abscissae. It must have the length of
26                         <literal>y</literal>. Default values are <literal>1:size(y,'*')</literal>.
27                     </para>
28                 </listitem>
29             </varlistentry>
30             <varlistentry>
31                 <term>y</term>
32                 <listitem>
33                     <para>
34                         vector of real or complex ordinates.
35                     </para>
36                 </listitem>
37             </varlistentry>
38             <varlistentry>
39                 <term>v</term>
40                 <listitem>
41                     <para>value of the integral. If <literal>y</literal> are complex numbers, the
42                       real and imaginary parts are integrated separately.
43                     </para>
44                 </listitem>
45             </varlistentry>
46         </variablelist>
47     </refsection>
48     <refsection>
49         <title>Description</title>
50         <para>
51             Let <literal>f</literal> be a function defined at some given sampled experimental points
52             <literal>(xi, yi=f(xi))</literal>.
53         </para>
54         <para>
55           <function>intsplin</function> computes an approximate of <literal>integral{f(x).dx}</literal>
56           from <literal>x0=x(1)</literal> to <literal>x1=x($)</literal>.
57         </para>
58         <para>
59             Between given points, <literal>f</literal> is approximated using a spline interpolation.
60         </para>
61     </refsection>
62     <refsection>
63         <title>Examples</title>
64         <programlisting role="example"><![CDATA[
65 t = 0:0.1:%pi
66 intsplin(t,sin(t))
67
68 intsplin(1:5)            // 12
69
70 x = 0:0.1:0.4;
71 intsplin(x, 1:5)         // 1.2
72
73 intsplin((1:5)*%i)       // 12i
74 intsplin(x, (1:5)*%i)    // 1.2i
75 intsplin(x, x+(1:5)*%i)  // 0.08 + 1.2i
76 ]]></programlisting>
77     </refsection>
78     <refsection role="see also">
79         <title>See also</title>
80         <simplelist type="inline">
81             <member>
82                 <link linkend="intg">intg</link>
83             </member>
84             <member>
85                 <link linkend="integrate">integrate</link>
86             </member>
87             <member>
88                 <link linkend="inttrap">inttrap</link>
89             </member>
90             <member>
91                 <link linkend="splin">splin</link>
92             </member>
93         </simplelist>
94     </refsection>
95 </refentry>