summaryrefslogtreecommitdiff
path: root/modules/interpolation/help/en_US/smooth.xml
blob: cc90efe34b6292c8a507afce625515a7a7f0ce4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?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="smooth" xml:lang="en">
    <refnamediv>
        <refname>smooth</refname>
        <refpurpose>smoothing by spline functions</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[pt]=smooth(ptd [,step])</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>ptd</term>
                <listitem>
                    <para>(2xn) real vector</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>step</term>
                <listitem>
                    <para>real (discretization step of abscissae)</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>pt</term>
                <listitem>
                    <para>(2xn) real vector</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>this function computes interpolation by spline functions for a given
            set of points in the plane. The coordinates are
            <literal>(ptd(1,i),ptd(2,i))</literal>. The components
            <literal>ptd(1,:)</literal> must be in ascending order. The default value
            for the step is
            <literal>abs(max(ptd(1,:))-min(ptd(1,:)))/100</literal>
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
x=[1 10 20 30 40];
y=[1 30 -10 20 40];
plot2d(x',y',[3],"011"," ",[-10,-40,50,50]);
yi=smooth([x;y],0.1);
plot2d(yi(1,:)',yi(2,:)',[1],"000");
 ]]></programlisting>
        <scilab:image>
            x=[1 10 20 30 40];
            y=[1 30 -10 20 40];
            plot2d(x',y',[3],"011"," ",[-10,-40,50,50]);
            yi=smooth([x;y],0.1);
            plot2d(yi(1,:)',yi(2,:)',[1],"000");
        </scilab:image>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="splin">splin</link>
            </member>
            <member>
                <link linkend="interp">interp</link>
            </member>
            <member>
                <link linkend="interpln">interpln</link>
            </member>
        </simplelist>
    </refsection>
</refentry>