summaryrefslogtreecommitdiff
path: root/modules/polynomials/help/en_US/varn.xml
blob: d1423ff237400f35ae6e73f2b09aa6a4f1cfe62b (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?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: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="varn">
    <refnamediv>
        <refname>varn</refname>
        <refpurpose>symbolic variable of a polynomial or a rational</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Calling Sequence</title>
        <synopsis>[symb]=varn(p)
            [pm]=varn(p,varname)
        </synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>p</term>
                <listitem>
                    <para>matrix of polynomials or of rationals</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>symb</term>
                <listitem>
                    <para>character string: name of the variable</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>varname</term>
                <listitem>
                    <para>
                        character string: the new name of the variable of <literal>p</literal>, set for <literal>pm</literal>
                    </para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>pm</term>
                <listitem>
                    <para>matrix of polynomials or of rationals</para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>
            <literal>symb=varn(p)</literal> returns in <literal>symb</literal> the symbolic variable of the polynomial <literal>p</literal>
            (i.e. <literal>varn(poly(0,'x'))</literal> is <literal>'x'</literal>).
        </para>
        <para>
            <literal>varn(p,'s')</literal> returns a polynomial matrix with same coefficients
            as <literal>p</literal> but with <literal>'s'</literal> as symbolic variable (change of variable name).
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[ 
s = poly(0,'s'); p = [s^2+1,s];
varn(p)
varn(p,'x')

f = %z / (%z-1); f = [f f^2]
varn(f)
varn(f,"x")
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See Also</title>
        <simplelist type="inline">
            <member>
                <link linkend="poly">poly</link>
            </member>
            <member>
                <link linkend="rlist">rlist</link>
            </member>
            <member>
                <link linkend="horner">horner</link>
            </member>
        </simplelist>
    </refsection>
    <refsection>
        <title>History</title>
        <revhistory>
            <revision>
                <revnumber>5.5.1</revnumber>
                <revdescription>
                    <para>Extension to rationals</para>
                </revdescription>
            </revision>
        </revhistory>
    </refsection>
</refentry>