summaryrefslogtreecommitdiffstats
path: root/scilab/modules/polynomials
diff options
context:
space:
mode:
authorClément David <clement.david@esi-group.com>2021-07-15 15:50:48 +0200
committerClément David <clement.david@esi-group.com>2021-07-15 15:50:48 +0200
commit81a9cc049332de0c712cf56da585fcd25c8e59e3 (patch)
treef365c25a05c1782a16b2985bf7481116c106952d /scilab/modules/polynomials
parentb0937f19e4b8ddf416ca9a9a433bcbbd3f4ef2c0 (diff)
parent90b4ecb9b57ac6ad4e00d4a99b0d8bd1a6424403 (diff)
downloadscilab-master.zip
scilab-master.tar.gz
Merge remote-tracking branch 'origin/6.1'HEADmaster
Change-Id: I5d26fc380a28efe0bb6d0096fe9684b274b55bfe
Diffstat (limited to 'scilab/modules/polynomials')
-rw-r--r--scilab/modules/polynomials/Makefile.in2
-rw-r--r--scilab/modules/polynomials/help/en_US/chepol.xml30
-rw-r--r--scilab/modules/polynomials/help/en_US/cmndred.xml2
-rw-r--r--scilab/modules/polynomials/help/en_US/coeff.xml24
-rw-r--r--scilab/modules/polynomials/help/en_US/colcompr.xml33
-rw-r--r--scilab/modules/polynomials/help/en_US/derivat.xml18
-rw-r--r--scilab/modules/polynomials/help/en_US/determ.xml41
-rw-r--r--scilab/modules/polynomials/help/en_US/detr.xml32
-rw-r--r--scilab/modules/polynomials/help/en_US/factors.xml82
-rw-r--r--scilab/modules/polynomials/help/en_US/hermit.xml26
-rw-r--r--scilab/modules/polynomials/help/en_US/horner.xml116
-rw-r--r--scilab/modules/polynomials/help/en_US/hrmt.xml33
-rw-r--r--scilab/modules/polynomials/help/en_US/htrianr.xml14
-rw-r--r--scilab/modules/polynomials/help/en_US/inv_coeff.xml14
-rw-r--r--scilab/modules/polynomials/help/en_US/invr.xml59
-rw-r--r--scilab/modules/polynomials/help/en_US/lcmdiag.xml18
-rw-r--r--scilab/modules/polynomials/help/en_US/ldiv.xml2
-rw-r--r--scilab/modules/polynomials/help/en_US/pol2str.xml17
-rw-r--r--scilab/modules/polynomials/help/en_US/polfact.xml96
-rw-r--r--scilab/modules/polynomials/help/en_US/polyint.xml177
-rw-r--r--scilab/modules/polynomials/help/en_US/rational.xml137
-rw-r--r--scilab/modules/polynomials/help/en_US/residu.xml2
-rw-r--r--scilab/modules/polynomials/help/en_US/roots.xml80
-rw-r--r--scilab/modules/polynomials/help/en_US/rowcompr.xml2
-rw-r--r--scilab/modules/polynomials/help/en_US/sfact.xml8
-rw-r--r--scilab/modules/polynomials/help/en_US/simp.xml62
-rw-r--r--scilab/modules/polynomials/help/en_US/simp_mode.xml30
-rw-r--r--scilab/modules/polynomials/help/fr_FR/cmndred.xml2
-rw-r--r--scilab/modules/polynomials/help/fr_FR/coeff.xml21
-rw-r--r--scilab/modules/polynomials/help/fr_FR/colcompr.xml33
-rw-r--r--scilab/modules/polynomials/help/fr_FR/derivat.xml32
-rw-r--r--scilab/modules/polynomials/help/fr_FR/determ.xml54
-rw-r--r--scilab/modules/polynomials/help/fr_FR/detr.xml30
-rw-r--r--scilab/modules/polynomials/help/fr_FR/factors.xml113
-rw-r--r--scilab/modules/polynomials/help/fr_FR/hermit.xml26
-rw-r--r--scilab/modules/polynomials/help/fr_FR/horner.xml130
-rw-r--r--scilab/modules/polynomials/help/fr_FR/hrmt.xml30
-rw-r--r--scilab/modules/polynomials/help/fr_FR/htrianr.xml14
-rw-r--r--scilab/modules/polynomials/help/fr_FR/inv_coeff.xml17
-rw-r--r--scilab/modules/polynomials/help/fr_FR/invr.xml79
-rw-r--r--scilab/modules/polynomials/help/fr_FR/pol2str.xml15
-rw-r--r--scilab/modules/polynomials/help/fr_FR/polfact.xml117
-rw-r--r--scilab/modules/polynomials/help/fr_FR/rational.xml141
-rw-r--r--scilab/modules/polynomials/help/fr_FR/residu.xml2
-rw-r--r--scilab/modules/polynomials/help/fr_FR/roots.xml48
-rw-r--r--scilab/modules/polynomials/help/fr_FR/rowcompr.xml4
-rw-r--r--scilab/modules/polynomials/help/fr_FR/sfact.xml35
-rw-r--r--scilab/modules/polynomials/help/fr_FR/simp.xml84
-rw-r--r--scilab/modules/polynomials/help/fr_FR/simp_mode.xml29
-rw-r--r--scilab/modules/polynomials/help/ja_JP/chepol.xml28
-rw-r--r--scilab/modules/polynomials/help/ja_JP/cmndred.xml2
-rw-r--r--scilab/modules/polynomials/help/ja_JP/coeff.xml24
-rw-r--r--scilab/modules/polynomials/help/ja_JP/coffg.xml2
-rw-r--r--scilab/modules/polynomials/help/ja_JP/colcompr.xml33
-rw-r--r--scilab/modules/polynomials/help/ja_JP/derivat.xml14
-rw-r--r--scilab/modules/polynomials/help/ja_JP/determ.xml31
-rw-r--r--scilab/modules/polynomials/help/ja_JP/detr.xml56
-rw-r--r--scilab/modules/polynomials/help/ja_JP/factors.xml66
-rw-r--r--scilab/modules/polynomials/help/ja_JP/hermit.xml26
-rw-r--r--scilab/modules/polynomials/help/ja_JP/horner.xml115
-rw-r--r--scilab/modules/polynomials/help/ja_JP/hrmt.xml30
-rw-r--r--scilab/modules/polynomials/help/ja_JP/htrianr.xml14
-rw-r--r--scilab/modules/polynomials/help/ja_JP/inv_coeff.xml17
-rw-r--r--scilab/modules/polynomials/help/ja_JP/invr.xml59
-rw-r--r--scilab/modules/polynomials/help/ja_JP/pol2str.xml12
-rw-r--r--scilab/modules/polynomials/help/ja_JP/polfact.xml94
-rw-r--r--scilab/modules/polynomials/help/ja_JP/rational.xml141
-rw-r--r--scilab/modules/polynomials/help/ja_JP/residu.xml2
-rw-r--r--scilab/modules/polynomials/help/ja_JP/roots.xml120
-rw-r--r--scilab/modules/polynomials/help/ja_JP/rowcompr.xml2
-rw-r--r--scilab/modules/polynomials/help/ja_JP/sfact.xml4
-rw-r--r--scilab/modules/polynomials/help/ja_JP/simp.xml65
-rw-r--r--scilab/modules/polynomials/help/ja_JP/simp_mode.xml30
-rw-r--r--scilab/modules/polynomials/help/pt_BR/cmndred.xml2
-rw-r--r--scilab/modules/polynomials/help/pt_BR/coeff.xml26
-rw-r--r--scilab/modules/polynomials/help/pt_BR/coffg.xml2
-rw-r--r--scilab/modules/polynomials/help/pt_BR/colcompr.xml33
-rw-r--r--scilab/modules/polynomials/help/pt_BR/derivat.xml16
-rw-r--r--scilab/modules/polynomials/help/pt_BR/determ.xml34
-rw-r--r--scilab/modules/polynomials/help/pt_BR/detr.xml42
-rw-r--r--scilab/modules/polynomials/help/pt_BR/factors.xml86
-rw-r--r--scilab/modules/polynomials/help/pt_BR/hermit.xml26
-rw-r--r--scilab/modules/polynomials/help/pt_BR/horner.xml116
-rw-r--r--scilab/modules/polynomials/help/pt_BR/hrmt.xml35
-rw-r--r--scilab/modules/polynomials/help/pt_BR/htrianr.xml20
-rw-r--r--scilab/modules/polynomials/help/pt_BR/inv_coeff.xml16
-rw-r--r--scilab/modules/polynomials/help/pt_BR/invr.xml46
-rw-r--r--scilab/modules/polynomials/help/pt_BR/pol2str.xml24
-rw-r--r--scilab/modules/polynomials/help/pt_BR/polfact.xml94
-rw-r--r--scilab/modules/polynomials/help/pt_BR/rational.xml142
-rw-r--r--scilab/modules/polynomials/help/pt_BR/residu.xml2
-rw-r--r--scilab/modules/polynomials/help/pt_BR/roots.xml119
-rw-r--r--scilab/modules/polynomials/help/pt_BR/rowcompr.xml8
-rw-r--r--scilab/modules/polynomials/help/pt_BR/sfact.xml2
-rw-r--r--scilab/modules/polynomials/help/pt_BR/simp.xml66
-rw-r--r--scilab/modules/polynomials/help/pt_BR/simp_mode.xml30
-rw-r--r--scilab/modules/polynomials/help/ru_RU/inv_coeff.xml20
-rw-r--r--scilab/modules/polynomials/help/ru_RU/rational.xml142
-rw-r--r--scilab/modules/polynomials/macros/polyint.sci92
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/polyint.tst55
100 files changed, 2745 insertions, 1751 deletions
diff --git a/scilab/modules/polynomials/Makefile.in b/scilab/modules/polynomials/Makefile.in
index 1663058..5a3e218 100644
--- a/scilab/modules/polynomials/Makefile.in
+++ b/scilab/modules/polynomials/Makefile.in
@@ -499,9 +499,11 @@ NMEDIT = @NMEDIT@
499OBJDUMP = @OBJDUMP@ 499OBJDUMP = @OBJDUMP@
500OBJEXT = @OBJEXT@ 500OBJEXT = @OBJEXT@
501OCAMLC = @OCAMLC@ 501OCAMLC = @OCAMLC@
502OCAMLCFLAGS = @OCAMLCFLAGS@
502OCAMLDEP = @OCAMLDEP@ 503OCAMLDEP = @OCAMLDEP@
503OCAMLLEX = @OCAMLLEX@ 504OCAMLLEX = @OCAMLLEX@
504OCAMLOPT = @OCAMLOPT@ 505OCAMLOPT = @OCAMLOPT@
506OCAMLOPTFLAGS = @OCAMLOPTFLAGS@
505OCAMLYACC = @OCAMLYACC@ 507OCAMLYACC = @OCAMLYACC@
506OPENMPI_CC = @OPENMPI_CC@ 508OPENMPI_CC = @OPENMPI_CC@
507OPENMPI_CFLAGS = @OPENMPI_CFLAGS@ 509OPENMPI_CFLAGS = @OPENMPI_CFLAGS@
diff --git a/scilab/modules/polynomials/help/en_US/chepol.xml b/scilab/modules/polynomials/help/en_US/chepol.xml
index d5da27b..9ae2e1f 100644
--- a/scilab/modules/polynomials/help/en_US/chepol.xml
+++ b/scilab/modules/polynomials/help/en_US/chepol.xml
@@ -2,11 +2,11 @@
2<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="chepol"> 2<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="chepol">
3 <refnamediv> 3 <refnamediv>
4 <refname>chepol</refname> 4 <refname>chepol</refname>
5 <refpurpose>Chebychev polynomial</refpurpose> 5 <refpurpose>Chebychev polynomials</refpurpose>
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Syntax</title> 8 <title>Syntax</title>
9 <synopsis>[Tn]=chepol(n,var)</synopsis> 9 <synopsis>Tn = chepol(n, var)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Arguments</title> 12 <title>Arguments</title>
@@ -44,7 +44,29 @@
44 <refsection> 44 <refsection>
45 <title>Examples</title> 45 <title>Examples</title>
46 <programlisting role="example"><![CDATA[ 46 <programlisting role="example"><![CDATA[
47chepol(4,'x') 47for i = 1:10, p = chepol(i, "x"); disp(p), end
48 ]]></programlisting> 48 ]]></programlisting>
49 <screen><![CDATA[
50--> for i = 1:10, p = chepol(i, "x"); disp(p), end
51 x
52
53 -1 +2x²
54
55 -3x +4x³
56
57 1 -8x² +8x⁴
58
59 5x -20x³ +16x⁵
60
61 -1 +18x² -48x⁴ +32x⁶
62
63 -7x +56x³ -112x⁵ +64x⁷
64
65 1 -32x² +160x⁴ -256x⁶ +128x⁸
66
67 9x -120x³ +432x⁵ -576x⁷ +256x⁹
68
69 -1 +50x² -400x⁴ +1120x⁶ -1280x⁸ +512x¹⁰
70]]></screen>
49 </refsection> 71 </refsection>
50</refentry> 72</refentry>
diff --git a/scilab/modules/polynomials/help/en_US/cmndred.xml b/scilab/modules/polynomials/help/en_US/cmndred.xml
index 20642f3..8995a98 100644
--- a/scilab/modules/polynomials/help/en_US/cmndred.xml
+++ b/scilab/modules/polynomials/help/en_US/cmndred.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[n,d]=cmndred(num,den)</synopsis> 23 <synopsis>[n, d] = cmndred(num, den)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
diff --git a/scilab/modules/polynomials/help/en_US/coeff.xml b/scilab/modules/polynomials/help/en_US/coeff.xml
index fe055e6..9bef948 100644
--- a/scilab/modules/polynomials/help/en_US/coeff.xml
+++ b/scilab/modules/polynomials/help/en_US/coeff.xml
@@ -16,11 +16,14 @@
16<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="coeff"> 16<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="coeff">
17 <refnamediv> 17 <refnamediv>
18 <refname>coeff</refname> 18 <refname>coeff</refname>
19 <refpurpose>coefficients of matrix polynomial</refpurpose> 19 <refpurpose>polynomial coefficients</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[C]=coeff(Mp [,v])</synopsis> 23 <synopsis>
24 C = coeff(Mp)
25 C = coeff(Mp, degrees)
26 </synopsis>
24 </refsynopsisdiv> 27 </refsynopsisdiv>
25 <refsection> 28 <refsection>
26 <title>Arguments</title> 29 <title>Arguments</title>
@@ -28,13 +31,13 @@
28 <varlistentry> 31 <varlistentry>
29 <term>Mp</term> 32 <term>Mp</term>
30 <listitem> 33 <listitem>
31 <para>polynomial matrix</para> 34 <para>Matrix of polynomials.</para>
32 </listitem> 35 </listitem>
33 </varlistentry> 36 </varlistentry>
34 <varlistentry> 37 <varlistentry>
35 <term>v</term> 38 <term>degrees</term>
36 <listitem> 39 <listitem>
37 <para>integer (row or column) vector of selected degrees</para> 40 <para>vector (row or column) of selected degrees (positive integers).</para>
38 </listitem> 41 </listitem>
39 </varlistentry> 42 </varlistentry>
40 <varlistentry> 43 <varlistentry>
@@ -56,15 +59,15 @@
56 <literal>k = max(degree(Mp))</literal> 59 <literal>k = max(degree(Mp))</literal>
57 </para> 60 </para>
58 <para> 61 <para>
59 <literal>C=coeff(Mp,v)</literal> returns the matrix of coefficients with 62 <literal>C=coeff(Mp,degrees)</literal> returns the matrix of coefficients with
60 degree in <literal>v</literal> . (<literal>v</literal> is a row or column vector). 63 degree in <literal>degrees</literal>.
61 </para> 64 </para>
62 </refsection> 65 </refsection>
63 <refsection> 66 <refsection>
64 <title>Examples</title> 67 <title>Examples</title>
65 <programlisting role="example"><![CDATA[ 68 <programlisting role="example"><![CDATA[
66s=poly(0,'s'); 69s = %s;
67w=s*rand(10,10); 70w = s*rand(10,10);
68determ(w) 71determ(w)
69coeff(w,1) 72coeff(w,1)
70 73
@@ -73,8 +76,7 @@ coeff(r)
73 76
74r = poly([-1-%i -1+2*%i 0],'s',"roots"); 77r = poly([-1-%i -1+2*%i 0],'s',"roots");
75coeff(r) 78coeff(r)
76 79 ]]></programlisting>
77 ]]></programlisting>
78 </refsection> 80 </refsection>
79 <refsection role="see also"> 81 <refsection role="see also">
80 <title>See also</title> 82 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/colcompr.xml b/scilab/modules/polynomials/help/en_US/colcompr.xml
index bdcbbe5..0930cd4 100644
--- a/scilab/modules/polynomials/help/en_US/colcompr.xml
+++ b/scilab/modules/polynomials/help/en_US/colcompr.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[Y,rk,ac]=colcompr(A);</synopsis> 23 <synopsis>[Y, rk, ac] = colcompr(A);</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -64,11 +64,32 @@
64 <refsection> 64 <refsection>
65 <title>Examples</title> 65 <title>Examples</title>
66 <programlisting role="example"><![CDATA[ 66 <programlisting role="example"><![CDATA[
67s=poly(0,'s'); 67s = %s;
68p=[s;s*(s+1)^2;2*s^2+s^3]; 68p = [s ; s*(s+1)^2 ; 2*s^2+s^3]
69[Y,rk,ac]=colcompr(p*p'); 69[Y, rk, ac] = colcompr(p*p');
70p*p'*Y 70Y
71 ]]></programlisting> 71clean(ac)
72 ]]></programlisting>
73 <screen><![CDATA[
74--> p = [s ; s*(s+1)^2 ; 2*s^2+s^3]
75 p =
76 s
77 s +2s² +s³
78 2s² +s³
79
80--> [Y, rk, ac] = colcompr(p*p');
81--> Y
82 Y =
83 1 +2s +s² 2s +s² 1
84 -1 0 0
85 0 -1 0
86
87--> clean(ac)
88 ans =
89 0 0 s²
90 0 0 s² +2s³ +s⁴
91 0 0 2s³ +s⁴
92 ]]></screen>
72 </refsection> 93 </refsection>
73 <refsection role="see also"> 94 <refsection role="see also">
74 <title>See also</title> 95 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/derivat.xml b/scilab/modules/polynomials/help/en_US/derivat.xml
index af4437d..47867d4 100644
--- a/scilab/modules/polynomials/help/en_US/derivat.xml
+++ b/scilab/modules/polynomials/help/en_US/derivat.xml
@@ -16,19 +16,19 @@
16<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="derivat"> 16<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="derivat">
17 <refnamediv> 17 <refnamediv>
18 <refname>derivat</refname> 18 <refname>derivat</refname>
19 <refpurpose>Rational matrix derivative</refpurpose> 19 <refpurpose>derivative of polynomials or of rationals</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>pd=derivat(p)</synopsis> 23 <synopsis>pd = derivat(p)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
27 <variablelist> 27 <variablelist>
28 <varlistentry> 28 <varlistentry>
29 <term>p</term> 29 <term>p, pd</term>
30 <listitem> 30 <listitem>
31 <para>polynomial or rational matrix</para> 31 <para>arrays of polynomials or of rationals</para>
32 </listitem> 32 </listitem>
33 </varlistentry> 33 </varlistentry>
34 </variablelist> 34 </variablelist>
@@ -48,7 +48,7 @@
48 <refsection> 48 <refsection>
49 <title>Examples</title> 49 <title>Examples</title>
50 <programlisting role="example"><![CDATA[ 50 <programlisting role="example"><![CDATA[
51s=poly(0,'s'); 51s = poly(0,'s');
52derivat(1/s) // -1/s^2; 52derivat(1/s) // -1/s^2;
53 ]]></programlisting> 53 ]]></programlisting>
54 <programlisting role="example"><![CDATA[ 54 <programlisting role="example"><![CDATA[
@@ -72,4 +72,12 @@ s = %s; p5 = s^(-1) + 2 + 3*s
72derivat(p5) 72derivat(p5)
73 ]]></programlisting> 73 ]]></programlisting>
74 </refsection> 74 </refsection>
75 <refsection role="see also">
76 <title>See also</title>
77 <simplelist type="inline">
78 <member>
79 <link linkend="polyint">polyint</link>
80 </member>
81 </simplelist>
82 </refsection>
75</refentry> 83</refentry>
diff --git a/scilab/modules/polynomials/help/en_US/determ.xml b/scilab/modules/polynomials/help/en_US/determ.xml
index 0b495ba..966cd2f 100644
--- a/scilab/modules/polynomials/help/en_US/determ.xml
+++ b/scilab/modules/polynomials/help/en_US/determ.xml
@@ -16,11 +16,14 @@
16<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="determ"> 16<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="determ">
17 <refnamediv> 17 <refnamediv>
18 <refname>determ</refname> 18 <refname>determ</refname>
19 <refpurpose>determinant of polynomial matrix</refpurpose> 19 <refpurpose>determinant of a matrix of polynomials</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>res=determ(W [,k])</synopsis> 23 <synopsis>
24 res = determ(W)
25 res = determ(W, k)
26 </synopsis>
24 </refsynopsisdiv> 27 </refsynopsisdiv>
25 <refsection> 28 <refsection>
26 <title>Arguments</title> 29 <title>Arguments</title>
@@ -28,7 +31,7 @@
28 <varlistentry> 31 <varlistentry>
29 <term>W</term> 32 <term>W</term>
30 <listitem> 33 <listitem>
31 <para>real square polynomial matrix</para> 34 <para>square matrix of real or complex polynomials</para>
32 </listitem> 35 </listitem>
33 </varlistentry> 36 </varlistentry>
34 <varlistentry> 37 <varlistentry>
@@ -42,30 +45,42 @@
42 <refsection> 45 <refsection>
43 <title>Description</title> 46 <title>Description</title>
44 <para> 47 <para>
45 returns the determinant of a real polynomial matrix 48 returns the determinant of a matrix of polynomials.
46 (computation made by FFT if W size is greater than 2*2).
47 </para> 49 </para>
48 <para> 50 <para>
49 <literal>res=determ(W [,k])</literal><literal>k</literal> is an integer larger than the actual degree of the determinant 51 <literal>res=determ(W [,k])</literal> where <literal>k</literal> is an integer larger
50 of <literal>W</literal>. 52 than the actual degree of the determinant of <literal>W</literal>.
51 </para> 53 </para>
52 <para> 54 <para>
53 The default value of <literal>k</literal> is the smallest power of 2 which is larger 55 The default value of <literal>k</literal> is the smallest power of 2 which is larger
54 than <literal>n*max(degree(W))</literal>. 56 than <literal>n*max(degree(W))</literal>.
55 </para> 57 </para>
56 <para> 58 <para>
57 Method (Only if W size is greater than 2*2) : evaluate the determinant of <literal>W</literal> for the Fourier frequencies 59 Method (Only if W size is greater than 2*2) : evaluate the determinant of
60 <literal>W</literal> for the Fourier frequencies
58 and apply inverse FFT to the coefficients of the determinant. 61 and apply inverse FFT to the coefficients of the determinant.
59 </para> 62 </para>
60 </refsection> 63 </refsection>
61 <refsection> 64 <refsection>
62 <title>Examples</title> 65 <title>Examples</title>
63 <programlisting role="example"><![CDATA[ 66 <programlisting role="example"><![CDATA[
64s=poly(0,'s'); 67s = %s;
65w=s*rand(10,10); 68P = [5+3*s, 1-5*s, -4+6*s ; -3+5*s, -3*s, -9 ; 8*s, -6-2*s, 4-6*s]
66determ(w) 69determ(P)
67det(coeff(w,1))*s^10 70 ]]></programlisting>
68 ]]></programlisting> 71 <screen><![CDATA[
72--> P = [5+3*s, 1-5*s, -4+6*s ; -3+5*s, -3*s, -9 ; 8*s, -6-2*s, 4-6*s]
73 P =
74 5 +3s 1 -5s -4 +6s
75
76 -3 +5s -3s -9
77
78 8s -6 -2s 4 -6s
79
80--> determ(P)
81 ans =
82 -330 -278s +380s² -12s³
83]]></screen>
69 </refsection> 84 </refsection>
70 <refsection role="see also"> 85 <refsection role="see also">
71 <title>See also</title> 86 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/detr.xml b/scilab/modules/polynomials/help/en_US/detr.xml
index 2bb3d21..c251635 100644
--- a/scilab/modules/polynomials/help/en_US/detr.xml
+++ b/scilab/modules/polynomials/help/en_US/detr.xml
@@ -16,11 +16,11 @@
16<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="detr"> 16<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="detr">
17 <refnamediv> 17 <refnamediv>
18 <refname>detr</refname> 18 <refname>detr</refname>
19 <refpurpose>polynomial determinant</refpurpose> 19 <refpurpose>determinant of a matrix of rationals</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>d=detr(h)</synopsis> 23 <synopsis>d = detr(h)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -28,7 +28,13 @@
28 <varlistentry> 28 <varlistentry>
29 <term>h</term> 29 <term>h</term>
30 <listitem> 30 <listitem>
31 <para>double or polynomial or rational square matrix</para> 31 <para>square matrix of numbers or polynomials or rationals</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term>d</term>
36 <listitem>
37 <para>scalar of the <varname>h</varname>'s type.</para>
32 </listitem> 38 </listitem>
33 </varlistentry> 39 </varlistentry>
34 </variablelist> 40 </variablelist>
@@ -36,15 +42,13 @@
36 <refsection> 42 <refsection>
37 <title>Description</title> 43 <title>Description</title>
38 <para> 44 <para>
39 <literal>d=detr(h)</literal> returns the determinant <literal>d</literal> of the double 45 <literal>d=detr(h)</literal> computes the determinant <literal>d</literal> of the
40 or polynomial or rational function matrix <literal>h</literal>. 46 matrix <literal>h</literal>, according to the Leverrier's algorithm.
41 Based on Leverrier's algorithm.
42 </para> 47 </para>
43 </refsection> 48 </refsection>
44 <refsection> 49 <refsection>
45 <title>Examples</title> 50 <title>Examples</title>
46 <programlisting role="example"> 51 <programlisting role="example"><![CDATA[
47 <![CDATA[
48// Matrix of doubles 52// Matrix of doubles
49A = rand(5,5); 53A = rand(5,5);
50detr(A) 54detr(A)
@@ -58,10 +62,16 @@ A = [1+x 2 5; 3 4-x 3+x; x^2 1 x];
58detr(A) 62detr(A)
59 63
60// Matrix of rationals 64// Matrix of rationals
61A = [1/x 2 3; 3 4/x 3/x; 1/x^2 1 1/x]; 65A = [1/x, 2, 3 ; 3, 4/x, 3/x ; 1/x^2, 1, 1/x];
62detr(A) 66detr(A)
63 ]]> 67 ]]></programlisting>
64 </programlisting> 68 <screen><![CDATA[
69--> detr(A)
70 ans =
71 -2 -3x -6x² +9x³
72 ----------------
73
74]]></screen>
65 </refsection> 75 </refsection>
66 <refsection role="see also"> 76 <refsection role="see also">
67 <title>See also</title> 77 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/factors.xml b/scilab/modules/polynomials/help/en_US/factors.xml
index 1122ec6..9ead4be 100644
--- a/scilab/modules/polynomials/help/en_US/factors.xml
+++ b/scilab/modules/polynomials/help/en_US/factors.xml
@@ -2,8 +2,8 @@
2<!-- 2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA 4 * Copyright (C) 2006-2008 - INRIA
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 * 7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -16,13 +16,16 @@
16<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="factors"> 16<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="factors">
17 <refnamediv> 17 <refnamediv>
18 <refname>factors</refname> 18 <refname>factors</refname>
19 <refpurpose>numeric real factorization</refpurpose> 19 <refpurpose>factorization in ℝ of a polynomial or a rational fraction</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[lnum,g]=factors(pol [,'flag']) 23 <synopsis>
24 [lnum,lden,g]=factors(rat [,'flag']) 24 [lnum, gain] = factors(pol)
25 rat=factors(rat,'flag') 25 [lnum, gain] = factors(pol, flag)
26 [lnum, lden, gain] = factors(rat)
27 [lnum, lden, gain] = factors(rat, flag)
28 rat = factors(rat, flag)
26 </synopsis> 29 </synopsis>
27 </refsynopsisdiv> 30 </refsynopsisdiv>
28 <refsection> 31 <refsection>
@@ -31,41 +34,36 @@
31 <varlistentry> 34 <varlistentry>
32 <term>pol</term> 35 <term>pol</term>
33 <listitem> 36 <listitem>
34 <para>real polynomial</para> 37 real polynomial.
38 <para/>
35 </listitem> 39 </listitem>
36 </varlistentry> 40 </varlistentry>
37 <varlistentry> 41 <varlistentry>
38 <term>rat</term> 42 <term>rat</term>
39 <listitem> 43 <listitem>
40 <para> 44 real rational (<literal>rat=pol1/pol2</literal>).
41 real rational polynomial (<literal>rat=pol1/pol2</literal>) 45 <para/>
42 </para>
43 </listitem>
44 </varlistentry>
45 <varlistentry>
46 <term>lnum</term>
47 <listitem>
48 <para>list of polynomials (of degrees 1 or 2)</para>
49 </listitem> 46 </listitem>
50 </varlistentry> 47 </varlistentry>
51 <varlistentry> 48 <varlistentry>
52 <term>lden</term> 49 <term>lnum, lden</term>
53 <listitem> 50 <listitem>
54 <para>list of polynomials (of degrees 1 or 2)</para> 51 lists of polynomials (of degrees 1 or 2).
52 <para/>
55 </listitem> 53 </listitem>
56 </varlistentry> 54 </varlistentry>
57 <varlistentry> 55 <varlistentry>
58 <term>g</term> 56 <term>gain</term>
59 <listitem> 57 <listitem>
60 <para>real number</para> 58 real number.
59 <para/>
61 </listitem> 60 </listitem>
62 </varlistentry> 61 </varlistentry>
63 <varlistentry> 62 <varlistentry>
64 <term>flag</term> 63 <term>flag</term>
65 <listitem> 64 <listitem>
66 <para> 65 character string: <literal>'c'</literal>, or <literal>'d'</literal>.
67 character string <literal>'c'</literal> or <literal>'d'</literal> 66 <para/>
68 </para>
69 </listitem> 67 </listitem>
70 </varlistentry> 68 </varlistentry>
71 </variablelist> 69 </variablelist>
@@ -73,25 +71,26 @@
73 <refsection> 71 <refsection>
74 <title>Description</title> 72 <title>Description</title>
75 <para> 73 <para>
76 returns the factors of polynomial <literal>pol</literal> in the list <literal>lnum</literal> 74 returns the factors of polynomial <literal>pol</literal> in the list <literal>lnum</literal>,
77 and the "gain" g. 75 and the "<varname>gain</varname>".
78 </para> 76 </para>
79 <para> 77 <para>
80 One has pol= g times product of entries of the list <literal>lnum</literal> 78 One has pol = gain times product of entries of the list <literal>lnum</literal>
81 (if <literal>flag</literal> is not given). If <literal>flag='c'</literal> is given, then 79 (if <literal>flag</literal> is not given). If <literal>flag='c'</literal> is given, then
82 one has <literal>|pol(i omega)|</literal> = <literal>|g*prod(lnum_j(i omega)|</literal>. 80 one has <literal>|pol(i omega)|</literal> = <literal>|gain*prod(lnum_j(i omega)|</literal>.
83 If <literal>flag='d'</literal> is given, then 81 If <literal>flag='d'</literal> is given, then
84 one has <literal>|pol(exp(i omega))|</literal> = <literal>|g*prod(lnum_i(exp(i omega))|</literal>. 82 one has <literal>|pol(exp(i omega))|</literal> = <literal>|gain*prod(lnum_i(exp(i omega))|</literal>.
85 If argument of <literal>factors</literal> is a 1x1 rational <literal>rat=pol1/pol2</literal>, 83 If argument of <literal>factors</literal> is a 1x1 rational <literal>rat=pol1/pol2</literal>,
86 the factors of the numerator <literal>pol1</literal> and the denominator <literal>pol2</literal> 84 the factors of the numerator <literal>pol1</literal> and the denominator <literal>pol2</literal>
87 are returned in the lists <literal>lnum</literal> and <literal>lden</literal> respectively. 85 are returned in the lists <literal>lnum</literal> and <literal>lden</literal> respectively.
88 </para> 86 </para>
89 <para> 87 <para>
90 The "gain" is returned as <literal>g</literal>,i.e. one has: 88 The "gain" is returned as <literal>gain</literal>,i.e. one has:
91 rat= g times (product entries in lnum) / (product entries in lden). 89 rat= gain times (product entries in lnum) / (product entries in lden).
92 </para> 90 </para>
93 <para> 91 <para>
94 If <literal>flag</literal> is <literal>'c'</literal> (resp. <literal>'d'</literal>), the roots of <literal>pol</literal> 92 If <literal>flag</literal> is <literal>'c'</literal> (resp. <literal>'d'</literal>),
93 the roots of <literal>pol</literal>
95 are reflected wrt the imaginary axis (resp. the unit circle), i.e. 94 are reflected wrt the imaginary axis (resp. the unit circle), i.e.
96 the factors in <literal>lnum</literal> are stable polynomials. 95 the factors in <literal>lnum</literal> are stable polynomials.
97 </para> 96 </para>
@@ -108,20 +107,29 @@
108 <refsection> 107 <refsection>
109 <title>Examples</title> 108 <title>Examples</title>
110 <programlisting role="example"><![CDATA[ 109 <programlisting role="example"><![CDATA[
111n=poly([0.2,2,5],'z'); 110n = poly([0.2,2,5],'z');
112d=poly([0.1,0.3,7],'z'); 111d = poly([0.1,0.3,7],'z');
113R=syslin('d',n,d); 112R = syslin('d',n,d);
114R1=factors(R,'d') 113R1 = factors(R,'d')
115roots(R1('num')) 114roots(R1('num'))
116roots(R1('den')) 115roots(R1('den'))
117w=exp(2*%i*%pi*[0:0.1:1]); 116w = exp(2*%i*%pi*[0:0.1:1]);
118norm(abs(horner(R1,w))-abs(horner(R,w))) 117norm(abs(horner(R1,w)) - abs(horner(R,w)))
119 ]]></programlisting> 118 ]]></programlisting>
120 </refsection> 119 </refsection>
121 <refsection role="see also"> 120 <refsection role="see also">
122 <title>See also</title> 121 <title>See also</title>
123 <simplelist type="inline"> 122 <simplelist type="inline">
124 <member> 123 <member>
124 <link linkend="polfact">polfact</link>
125 </member>
126 <member>
127 <link linkend="roots">roots</link>
128 </member>
129 <member>
130 <link linkend="pfss">pfss</link>
131 </member>
132 <member>
125 <link linkend="simp">simp</link> 133 <link linkend="simp">simp</link>
126 </member> 134 </member>
127 </simplelist> 135 </simplelist>
diff --git a/scilab/modules/polynomials/help/en_US/hermit.xml b/scilab/modules/polynomials/help/en_US/hermit.xml
index d20fe97..3ae7d1d 100644
--- a/scilab/modules/polynomials/help/en_US/hermit.xml
+++ b/scilab/modules/polynomials/help/en_US/hermit.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[Ar,U]=hermit(A)</synopsis> 23 <synopsis>[Ar, U] = hermit(A)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -63,11 +63,25 @@
63 <refsection> 63 <refsection>
64 <title>Examples</title> 64 <title>Examples</title>
65 <programlisting role="example"><![CDATA[ 65 <programlisting role="example"><![CDATA[
66s=poly(0,'s'); 66s = %s;
67p=[s, s*(s+1)^2, 2*s^2+s^3]; 67p = [s, s*(s+1)^2, 2*s^2+s^3];
68[Ar,U]=hermit(p'*p); 68[Ar,U] = hermit(p'*p);
69clean(p'*p*U), det(U) 69clean(p'*p*U)
70 ]]></programlisting> 70det(U)
71 ]]></programlisting>
72 <screen><![CDATA[
73--> clean(p'*p*U)
74 ans =
75 0 0 s²
76
77 0 0 s² +2s³ +s⁴
78
79 0 0 2s³ +s⁴
80
81--> det(U)
82 ans =
83 1
84]]></screen>
71 </refsection> 85 </refsection>
72 <refsection role="see also"> 86 <refsection role="see also">
73 <title>See also</title> 87 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/horner.xml b/scilab/modules/polynomials/help/en_US/horner.xml
index 3368af5..c511850 100644
--- a/scilab/modules/polynomials/help/en_US/horner.xml
+++ b/scilab/modules/polynomials/help/en_US/horner.xml
@@ -2,8 +2,8 @@
2<!-- 2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA 4 * Copyright (C) 2006-2008 - INRIA
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 * 7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -16,11 +16,11 @@
16<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="horner"> 16<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="horner">
17 <refnamediv> 17 <refnamediv>
18 <refname>horner</refname> 18 <refname>horner</refname>
19 <refpurpose>polynomial/rational evaluation</refpurpose> 19 <refpurpose>evaluates some polynomials or rationals for given values</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>horner(P,x)</synopsis> 23 <synopsis>horner(P, x)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -28,13 +28,13 @@
28 <varlistentry> 28 <varlistentry>
29 <term>P</term> 29 <term>P</term>
30 <listitem> 30 <listitem>
31 <para>polynomial or rational matrix</para> 31 <para>array of polynomials or of rationals.</para>
32 </listitem> 32 </listitem>
33 </varlistentry> 33 </varlistentry>
34 <varlistentry> 34 <varlistentry>
35 <term>x</term> 35 <term>x</term>
36 <listitem> 36 <listitem>
37 <para> array of numbers or polynomials or rationals</para> 37 <para>array of numbers, polynomials, or rationals.</para>
38 </listitem> 38 </listitem>
39 </varlistentry> 39 </varlistentry>
40 </variablelist> 40 </variablelist>
@@ -61,33 +61,101 @@
61 </refsection> 61 </refsection>
62 <refsection> 62 <refsection>
63 <title>Examples</title> 63 <title>Examples</title>
64 <para>
65 Evaluation of a polynomial:
66 </para>
64 <programlisting role="example"><![CDATA[ 67 <programlisting role="example"><![CDATA[
65//evaluation of a polynomial for a vector of numbers 68P = poly(1:3, 'x', 'coeff')
66P=poly(1:3,'x') 69s = %s;
67horner(P,[1 2 5]) 70horner(P, [1 2 ; 3 4]) // for real values
68horner(P,[1 2 5]+%i) 71horner(P, [1 2 ; 3 4]+%i) // for complex values
72horner(P, [1, s ; s^2, s^3]) // for polynomial values
73horner(P, [1/s, 1/s^2]) // for rational values
74 ]]></programlisting>
75 <screen><![CDATA[
76--> P = poly(1:3, 'x', 'coeff')
77 P =
78 1 +2x +3x²
79
80--> s = %s;
81--> horner(P, [1 2 ; 3 4]) // for real values
82 ans =
83 6. 17.
84 34. 57.
85
86--> horner(P, [1 2 ; 3 4]+%i) // for complex values
87 ans =
88 3. + 8.i 14. + 14.i
89 31. + 20.i 54. + 26.i
69 90
70//evaluation of a rational 91--> horner(P, [1, s ; s^2, s^3]) // for polynomial values
71s=poly(0,'s');M=[s,1/s]; 92 ans =
72horner(M,1) 93 6 1 +2s +3s²
73horner(M,%i)
74horner(M,1/s)
75 94
76//evaluation of a polynomial for a matrix of numbers 95 1 +2s² +3s⁴ 1 +2s³ +3s⁶
77X= [1 2;3 4] 96
78p=poly(1:3,'x','c') 97--> horner(P, [1/s, 1/s^2]) // for rational values
79m=horner(p, X) 98 ans =
801*X.^0+2*X.^1+3*X.^2 99 3 +2s +s² 3 +2s² +s⁴
81 ]]></programlisting> 100 --------- ----------
101 s² s⁴
102]]></screen>
103 <para/>
104 <para>
105 Evaluation of some rationals:
106 </para>
107 <programlisting role="example"><![CDATA[
108[s,z] = (%s, %z);
109M = [1/s, (s-1)/s]
110horner(M, 1)
111horner(M, %i)
112horner(M, 2+s)
113horner(M, (2+z)/z)
114horner(M, [1, 1/z ; 2, (2+z)/z])
115 ]]></programlisting>
116 <screen><![CDATA[
117--> M = [1/s, (s-1)/s]
118 M =
119 1 -1 +s
120 - -----
121 s s
122
123--> horner(M, 1)
124 ans =
125 1. 0.
126
127--> horner(M, %i)
128 ans =
129 0. - i 1. + i
130
131--> horner(M, 2+s)
132 ans =
133 1 1 +s
134 ---- ----
135 2 +s 2 +s
136
137--> horner(M, (2+z)/z)
138 ans =
139 z 2
140 ---- ----
141 2 +z 2 +z
142
143--> horner(M, [1, 1/z ; 2, (2+z)/z])
144 ans =
145 1 z 0 1 -z
146 - - - ----
147 1 1 1 1
148
149 1 z 1 2
150 - ---- - ----
151 2 2 +z 2 2 +z
152]]></screen>
82 </refsection> 153 </refsection>
83 <refsection role="see also"> 154 <refsection role="see also">
84 <title>See also</title> 155 <title>See also</title>
85 <simplelist type="inline"> 156 <simplelist type="inline">
86 <member> 157 <member>
87 <link linkend="freq">freq</link> 158 <link linkend="feval">feval</link>
88 </member>
89 <member>
90 <link linkend="repfreq">repfreq</link>
91 </member> 159 </member>
92 <member> 160 <member>
93 <link linkend="evstr">evstr</link> 161 <link linkend="evstr">evstr</link>
diff --git a/scilab/modules/polynomials/help/en_US/hrmt.xml b/scilab/modules/polynomials/help/en_US/hrmt.xml
index 0ea0cd9..9b43057 100644
--- a/scilab/modules/polynomials/help/en_US/hrmt.xml
+++ b/scilab/modules/polynomials/help/en_US/hrmt.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[pg,U]=hrmt(v)</synopsis> 23 <synopsis>[pg, U] = hrmt(v)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -42,7 +42,7 @@
42 <varlistentry> 42 <varlistentry>
43 <term>U</term> 43 <term>U</term>
44 <listitem> 44 <listitem>
45 <para>unimodular matrix polynomial</para> 45 <para>unimodular matrix polynomial.</para>
46 </listitem> 46 </listitem>
47 </varlistentry> 47 </varlistentry>
48 </variablelist> 48 </variablelist>
@@ -50,18 +50,37 @@
50 <refsection> 50 <refsection>
51 <title>Description</title> 51 <title>Description</title>
52 <para> 52 <para>
53 <literal>[pg,U]=hrmt(v)</literal> returns a unimodular matrix <literal>U</literal> and <literal>pg</literal> = gcd of row of 53 <literal>[pg,U]=hrmt(v)</literal> returns a unimodular matrix <literal>U</literal> and
54 <literal>pg</literal> = gcd of row of
54 polynomials <literal>v</literal> such that <literal>v*U = [pg,0]</literal>. 55 polynomials <literal>v</literal> such that <literal>v*U = [pg,0]</literal>.
55 </para> 56 </para>
56 </refsection> 57 </refsection>
57 <refsection> 58 <refsection>
58 <title>Examples</title> 59 <title>Examples</title>
59 <programlisting role="example"><![CDATA[ 60 <programlisting role="example"><![CDATA[
60x=poly(0,'x'); 61x = poly(0,'x');
61v=[x*(x+1),x^2*(x+1),(x-2)*(x+1),(3*x^2+2)*(x+1)]; 62v = [x*(x+1), x^2*(x+1), (x-2)*(x+1), (3*x^2+2)*(x+1)]
62[pg,U]=hrmt(v);U=clean(U) 63[pg, U] = hrmt(v);
64U = clean(U)
63det(U) 65det(U)
64 ]]></programlisting> 66 ]]></programlisting>
67 <screen><![CDATA[
68--> v = [x*(x+1), x^2*(x+1), (x-2)*(x+1), (3*x^2+2)*(x+1)]
69 v =
70 x +x² x² +x³ -2 -x +x² 2 +2x +3x² +3x³
71
72--> [pg, U] = hrmt(v);
73--> U = clean(U)
74 U =
75 x -2 +x 1 +1.5x² 0.5
76 -1 0 0 0
77 0 -x -1 -1.5x² -0.5
78 0 0 -1 0
79
80--> det(U)
81 ans =
82 1
83]]></screen>
65 </refsection> 84 </refsection>
66 <refsection role="see also"> 85 <refsection role="see also">
67 <title>See also</title> 86 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/htrianr.xml b/scilab/modules/polynomials/help/en_US/htrianr.xml
index 3f685f2..6824633 100644
--- a/scilab/modules/polynomials/help/en_US/htrianr.xml
+++ b/scilab/modules/polynomials/help/en_US/htrianr.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[Ar,U,rk]=htrianr(A)</synopsis> 23 <synopsis>[Ar, U, rk] = htrianr(A)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -40,7 +40,7 @@
40 <varlistentry> 40 <varlistentry>
41 <term>U</term> 41 <term>U</term>
42 <listitem> 42 <listitem>
43 <para>unimodular polynomial matrix</para> 43 <para>unimodular polynomial matrix.</para>
44 </listitem> 44 </listitem>
45 </varlistentry> 45 </varlistentry>
46 <varlistentry> 46 <varlistentry>
@@ -59,7 +59,7 @@
59 triangularization of polynomial matrix <literal>A</literal>. 59 triangularization of polynomial matrix <literal>A</literal>.
60 </para> 60 </para>
61 <para> 61 <para>
62 <literal>A</literal> is <literal>[m,n]</literal> , <literal>m &lt;= n</literal>. 62 <literal>A</literal> is <literal>[m,n]</literal> , <literal>m n</literal>.
63 </para> 63 </para>
64 <para> 64 <para>
65 <literal>Ar=A*U</literal> 65 <literal>Ar=A*U</literal>
@@ -73,12 +73,12 @@
73 <refsection> 73 <refsection>
74 <title>Examples</title> 74 <title>Examples</title>
75 <programlisting role="example"><![CDATA[ 75 <programlisting role="example"><![CDATA[
76x=poly(0,'x'); 76x = poly(0,'x');
77M=[x;x^2;2+x^3]*[1,x-2,x^4]; 77M = [x ; x^2 ; 2+x^3]*[1, x-2, x^4];
78[Mu,U,rk]=htrianr(M) 78[Mu,U,rk] = htrianr(M)
79det(U) 79det(U)
80M*U(:,1:2) 80M*U(:,1:2)
81 ]]></programlisting> 81 ]]></programlisting>
82 </refsection> 82 </refsection>
83 <refsection role="see also"> 83 <refsection role="see also">
84 <title>See also</title> 84 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/en_US/inv_coeff.xml b/scilab/modules/polynomials/help/en_US/inv_coeff.xml
index 45adf2a..e0a24af 100644
--- a/scilab/modules/polynomials/help/en_US/inv_coeff.xml
+++ b/scilab/modules/polynomials/help/en_US/inv_coeff.xml
@@ -6,7 +6,11 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Syntax</title> 8 <title>Syntax</title>
9 <synopsis>[P]=inv_coeff(C,[,d,[name])</synopsis> 9 <synopsis>
10 P = inv_coeff(C)
11 P = inv_coeff(C, d)
12 P = inv_coeff(C, d, varname)
13 </synopsis>
10 </refsynopsisdiv> 14 </refsynopsisdiv>
11 <refsection> 15 <refsection>
12 <title>Arguments</title> 16 <title>Arguments</title>
@@ -26,7 +30,7 @@
26 </listitem> 30 </listitem>
27 </varlistentry> 31 </varlistentry>
28 <varlistentry> 32 <varlistentry>
29 <term>name</term> 33 <term>varname</term>
30 <listitem> 34 <listitem>
31 <para> 35 <para>
32 a string giving the polynomial variable name (default value <literal>'x'</literal>). 36 a string giving the polynomial variable name (default value <literal>'x'</literal>).
@@ -46,12 +50,12 @@
46 <refsection> 50 <refsection>
47 <title>Examples</title> 51 <title>Examples</title>
48 <programlisting role="example"><![CDATA[ 52 <programlisting role="example"><![CDATA[
49A=int(10*rand(2,6)) 53A = int(10*rand(2,6))
50// Building a degree 1 polynomial matrix 54// Building a degree 1 polynomial matrix
51P=inv_coeff(A,1) 55P = inv_coeff(A,1)
52norm(coeff(P)-A) 56norm(coeff(P)-A)
53// Using default value for degree 57// Using default value for degree
54P1=inv_coeff(A) 58P1 = inv_coeff(A)
55norm(coeff(P1)-A) 59norm(coeff(P1)-A)
56 ]]></programlisting> 60 ]]></programlisting>
57 </refsection> 61 </refsection>
diff --git a/scilab/modules/polynomials/help/en_US/invr.xml b/scilab/modules/polynomials/help/en_US/invr.xml
index a73f7b7..caf2385 100644
--- a/scilab/modules/polynomials/help/en_US/invr.xml
+++ b/scilab/modules/polynomials/help/en_US/invr.xml
@@ -2,8 +2,8 @@
2<!-- 2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA 4 * Copyright (C) 2006-2008 - INRIA
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 * 7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -16,7 +16,7 @@
16<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="invr"> 16<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="invr">
17 <refnamediv> 17 <refnamediv>
18 <refname>invr</refname> 18 <refname>invr</refname>
19 <refpurpose>inversion of (rational) matrix</refpurpose> 19 <refpurpose>inverts a matrix of polynomials or of rationals</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
@@ -42,30 +42,65 @@
42 <refsection> 42 <refsection>
43 <title>Description</title> 43 <title>Description</title>
44 <para> 44 <para>
45 If <literal>H</literal> is a polynomial or rational function matrix, <literal>invr</literal> 45 <literal>invr</literal> computes <literal>H<superscript>-1</superscript></literal>
46 computes <literal>H^(-1)</literal> using Leverrier's algorithm (see function code) 46 using Leverrier's algorithm (see function's code).
47 </para> 47 </para>
48 </refsection> 48 </refsection>
49 <refsection> 49 <refsection>
50 <title>Examples</title> 50 <title>Examples</title>
51 <programlisting role="example"><![CDATA[ 51 <programlisting role="example"><![CDATA[
52s=poly(0,'s') 52s = %s;
53H=[s,s*s+2;1-s,1+s]; invr(H) 53H = [s, s*s+2 ; 1-s, 1+s], iH = invr(H), H * iH
54[Num,den]=coffg(H);Num/den 54
55H=[1/s,(s+1);1/(s+2),(s+3)/s];invr(H) 55[Num,den] = coffg(H); Num/den
56 ]]></programlisting> 56H = [1/s, (s+1) ; 1/(s+2), (s+3)/s]; invr(H)
57 ]]></programlisting>
58 <screen><![CDATA[
59--> H = [s, s*s+2 ; 1-s, 1+s], iH = invr(H), H * iH
60 H =
61 s 2 +s²
62 1 -s 1 +s
63
64 iH =
65 1 +s -2 -s²
66 ---------- ----------
67 -2 +3s +s³ -2 +3s +s³
68
69 -1 +s s
70 ---------- ----------
71 -2 +3s +s³ -2 +3s +s³
72
73 ans =
74 1 0
75 - -
76 1 1
77
78 0 1
79 - -
80 1 1
81
82--> [Num,den] = coffg(H); Num/den
83 ans =
84 1 +s -2 -s²
85 ---------- ----------
86 -2 +3s +s³ -2 +3s +s³
87
88 -1 +s s
89 ---------- ----------
90 -2 +3s +s³ -2 +3s +s³
91]]></screen>
57 </refsection> 92 </refsection>
58 <refsection role="see also"> 93 <refsection role="see also">
59 <title>See also</title> 94 <title>See also</title>
60 <simplelist type="inline"> 95 <simplelist type="inline">
61 <member> 96 <member>
62 <link linkend="glever">glever</link> 97 <link linkend="inv">inv</link>
63 </member> 98 </member>
64 <member> 99 <member>
65 <link linkend="coffg">coffg</link> 100 <link linkend="glever">glever</link>
66 </member> 101 </member>
67 <member> 102 <member>
68 <link linkend="inv">inv</link> 103 <link linkend="coffg">coffg</link>
69 </member> 104 </member>
70 </simplelist> 105 </simplelist>
71 </refsection> 106 </refsection>
diff --git a/scilab/modules/polynomials/help/en_US/lcmdiag.xml b/scilab/modules/polynomials/help/en_US/lcmdiag.xml
index c06a19d..1af3be0 100644
--- a/scilab/modules/polynomials/help/en_US/lcmdiag.xml
+++ b/scilab/modules/polynomials/help/en_US/lcmdiag.xml
@@ -20,8 +20,10 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[N,D]=lcmdiag(H) 23 <synopsis>
24 [N,D]=lcmdiag(H,flag) 24 [N,D] = lcmdiag(H)
25 [N,D] = lcmdiag(H, 'row')
26 [N,D] = lcmdiag(H, 'col')
25 </synopsis> 27 </synopsis>
26 </refsynopsisdiv> 28 </refsynopsisdiv>
27 <refsection> 29 <refsection>
@@ -46,10 +48,10 @@
46 </listitem> 48 </listitem>
47 </varlistentry> 49 </varlistentry>
48 <varlistentry> 50 <varlistentry>
49 <term>flag</term> 51 <term>'row'|'col'</term>
50 <listitem> 52 <listitem>
51 <para> 53 <para>
52 character string: <literal>'row'</literal> or <literal>'col'</literal> (default) 54 character string: Default is <literal>'col'</literal>.
53 </para> 55 </para>
54 </listitem> 56 </listitem>
55 </varlistentry> 57 </varlistentry>
@@ -70,10 +72,10 @@
70 <refsection> 72 <refsection>
71 <title>Examples</title> 73 <title>Examples</title>
72 <programlisting role="example"><![CDATA[ 74 <programlisting role="example"><![CDATA[
73s=poly(0,'s'); 75s = poly(0,'s');
74H=[1/s,(s+2)/s/(s+1)^2;1/(s^2*(s+2)),2/(s+2)]; 76H = [1/s,(s+2)/s/(s+1)^2;1/(s^2*(s+2)),2/(s+2)];
75[N,D]=lcmdiag(H); 77[N,D] = lcmdiag(H);
76N/D-H 78N/D - H
77 ]]></programlisting> 79 ]]></programlisting>
78 </refsection> 80 </refsection>
79 <refsection role="see also"> 81 <refsection role="see also">
diff --git a/scilab/modules/polynomials/help/en_US/ldiv.xml b/scilab/modules/polynomials/help/en_US/ldiv.xml
index b1eefc2..8c71421 100644
--- a/scilab/modules/polynomials/help/en_US/ldiv.xml
+++ b/scilab/modules/polynomials/help/en_US/ldiv.xml
@@ -23,7 +23,7 @@
23 </refnamediv> 23 </refnamediv>
24 <refsynopsisdiv> 24 <refsynopsisdiv>
25 <title>Syntax</title> 25 <title>Syntax</title>
26 <synopsis>[x]=ldiv(n,d,k)</synopsis> 26 <synopsis>x = ldiv(n, d, k)</synopsis>
27 </refsynopsisdiv> 27 </refsynopsisdiv>
28 <refsection> 28 <refsection>
29 <title>Arguments</title> 29 <title>Arguments</title>
diff --git a/scilab/modules/polynomials/help/en_US/pol2str.xml b/scilab/modules/polynomials/help/en_US/pol2str.xml
index dbef52c..ea07fcc 100644
--- a/scilab/modules/polynomials/help/en_US/pol2str.xml
+++ b/scilab/modules/polynomials/help/en_US/pol2str.xml
@@ -21,21 +21,21 @@
21 </refnamediv> 21 </refnamediv>
22 <refsynopsisdiv> 22 <refsynopsisdiv>
23 <title>Syntax</title> 23 <title>Syntax</title>
24 <synopsis>strs = pol2str(p)</synopsis> 24 <synopsis>strP = pol2str(P)</synopsis>
25 </refsynopsisdiv> 25 </refsynopsisdiv>
26 <refsection> 26 <refsection>
27 <title>Arguments</title> 27 <title>Arguments</title>
28 <variablelist> 28 <variablelist>
29 <varlistentry> 29 <varlistentry>
30 <term>p</term> 30 <term>P</term>
31 <listitem> 31 <listitem>
32 <para>matrix or hypermatrix of polynomials with real or complex coefficients</para> 32 <para>array of polynomials with real or complex coefficients</para>
33 </listitem> 33 </listitem>
34 </varlistentry> 34 </varlistentry>
35 <varlistentry> 35 <varlistentry>
36 <term>strs</term> 36 <term>strP</term>
37 <listitem> 37 <listitem>
38 <para>matrix or hypermatrix of strings</para> 38 <para>array of strings, of size equal to size(P).</para>
39 </listitem> 39 </listitem>
40 </varlistentry> 40 </varlistentry>
41 </variablelist> 41 </variablelist>
@@ -43,7 +43,7 @@
43 <refsection> 43 <refsection>
44 <title>Description</title> 44 <title>Description</title>
45 <para> 45 <para>
46 converts polynomial to character string (utility function). 46 converts each polynomial of <varname>P</varname> to character string (utility function).
47 </para> 47 </para>
48 <para> 48 <para>
49 <note> 49 <note>
@@ -84,7 +84,10 @@ pol2str(p)
84 <revhistory> 84 <revhistory>
85 <revision> 85 <revision>
86 <revnumber>5.5.0</revnumber> 86 <revnumber>5.5.0</revnumber>
87 <revdescription>pol2str() extended to polynomials with complex coefficients and to hypermatrix. Array processing vectorized.</revdescription> 87 <revdescription>
88 pol2str() extended to polynomials with complex coefficients and to hypermatrix.
89 Array processing vectorized.
90 </revdescription>
88 </revision> 91 </revision>
89 </revhistory> 92 </revhistory>
90 </refsection> 93 </refsection>
diff --git a/scilab/modules/polynomials/help/en_US/polfact.xml b/scilab/modules/polynomials/help/en_US/polfact.xml
index 16d027e..578e23e 100644
--- a/scilab/modules/polynomials/help/en_US/polfact.xml
+++ b/scilab/modules/polynomials/help/en_US/polfact.xml
@@ -2,8 +2,8 @@
2<!-- 2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA - Serge STEER 4 * Copyright (C) 2006-2008 - INRIA - Serge STEER
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises 5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 * 7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0, 8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1. 9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
@@ -16,11 +16,11 @@
16<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="polfact"> 16<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="polfact">
17 <refnamediv> 17 <refnamediv>
18 <refname>polfact</refname> 18 <refname>polfact</refname>
19 <refpurpose>minimal factors</refpurpose> 19 <refpurpose>minimal real factors of a polynomial</refpurpose>
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[f]=polfact(p)</synopsis> 23 <synopsis>f = polfact(p)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -28,63 +28,93 @@
28 <varlistentry> 28 <varlistentry>
29 <term>p</term> 29 <term>p</term>
30 <listitem> 30 <listitem>
31 <para>polynomial</para> 31 <para>polynomial with real coefficients.</para>
32 </listitem> 32 </listitem>
33 </varlistentry> 33 </varlistentry>
34 <varlistentry> 34 <varlistentry>
35 <term>f</term> 35 <term>f</term>
36 <listitem> 36 <listitem>
37 <para> 37 <para>
38 vector <literal>[f0 f1 ... fn]</literal> such that <literal>p=prod(f)</literal> 38 row vector <literal>[f0 f1 ... fn]</literal> of polynomials with real
39 coefficients, such that <literal>p=prod(f)</literal>.
40 <literal>f0=f(1)</literal> is a constant polynomial. <literal>f(2:$)</literal>
41 are polynomials of degree 1 or 2.
39 </para> 42 </para>
40 <variablelist> 43 <warning>
41 <varlistentry> 44 The coefficients of <varname>f</varname> polynomials are computed with
42 <term>f0</term> 45 a relative uncertainty of
43 <listitem> 46 <literal>%eps</literal><superscript>1/degree(p)</superscript>.
44 <para>constant</para> 47 </warning>
45 </listitem>
46 </varlistentry>
47 <varlistentry>
48 <term>fi</term>
49 <listitem>
50 <para>polynomial</para>
51 </listitem>
52 </varlistentry>
53 </variablelist>
54 </listitem> 48 </listitem>
55 </varlistentry> 49 </varlistentry>
56 </variablelist> 50 </variablelist>
57 </refsection> 51 </refsection>
58 <refsection> 52 <refsection>
59 <title>Description</title>
60 <para>
61 <literal>f=polfact(p)</literal> returns the minimal factors of p i.e. <literal>f=[f0 f1 ... fn]</literal> such
62 that <literal>p=prod(f)</literal>
63 </para>
64 </refsection>
65 <refsection>
66 <title>Examples</title> 53 <title>Examples</title>
67 <programlisting role="example"><![CDATA[ 54 <programlisting role="example"><![CDATA[
68x = poly(0,"x") 55x = poly(0,"x");
69polfact(x^2-1) 56%eps^[1/3 1/7]
57
58p = (1-x)^3
59f = polfact(p)'
60prod(f)
61
62p = (1+x)^7
63f = polfact(p)'
64prod(f)
65 ]]></programlisting>
66 <screen><![CDATA[
67--> %eps^[1/3 1/7]
68 ans =
69 0.0000061 0.0058047
70
71--> p = (1-x)^3
72 p =
73 1 -3x +3x² -x³
74
75--> f = polfact(p)'
76 f =
77 -1
78 1.0000086 -2.0000086x +x²
79 -0.9999914 +x
80
81--> prod(f)
82 ans =
83 1 -3x +3x² -x³
84
70 85
71polfact(x^7-1) 86--> p = (1+x)^7
87 p =
88 1 +7x +21x² +35x³ +35x⁴ +21x⁵ +7x⁶ +x⁷
72 89
90--> f = polfact(p)'
91 f =
92 1
93 1.0092002 +x
94 1.0114552 +2.011371x +x²
95 0.9959088 +1.9958255x +x²
96 0.9836859 +1.9836034x +x²
73 97
74 ]]></programlisting> 98--> prod(f)
99 ans =
100 1 +7x +21x² +35x³ +35x⁴ +21x⁵ +7x⁶ +x⁷
101]]></screen>
75 </refsection> 102 </refsection>
76 103
77 <refsection role="see also"> 104 <refsection role="see also">
78 <title>See also</title> 105 <title>See also</title>
79 <simplelist type="inline"> 106 <simplelist type="inline">
80 <member> 107 <member>
81 <link linkend="lcm">lcm</link> 108 <link linkend="factors">factors</link>
82 </member> 109 </member>
83 <member> 110 <member>
84 <link linkend="cmndred">cmndred</link> 111 <link linkend="roots">roots</link>
85 </member> 112 </member>
86 <member> 113 <member>
87 <link linkend="factors">factors</link> 114 <link linkend="lcm">lcm</link>
115 </member>
116 <member>
117 <link linkend="cmndred">cmndred</link>
88 </member> 118 </member>
89 </simplelist> 119 </simplelist>
90 </refsection> 120 </refsection>
diff --git a/scilab/modules/polynomials/help/en_US/polyint.xml b/scilab/modules/polynomials/help/en_US/polyint.xml
new file mode 100644
index 0000000..8125081
--- /dev/null
+++ b/scilab/modules/polynomials/help/en_US/polyint.xml
@@ -0,0 +1,177 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2020 - Samuel GOUGEON - Le Mans Université
5 *
6 * This file is hereby licensed under the terms of the GNU GPL v2.0,
7 * pursuant to article 5.3.4 of the CeCILL v.2.1.
8 * This file was originally licensed under the terms of the CeCILL v2.1,
9 * and continues to be available under such terms.
10 * For more information, see the COPYING file which you should have received
11 * along with this program.
12 *
13 -->
14<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
15 xmlns:svg="http://www.w3.org/2000/svg" xmlns:db="http://docbook.org/ns/docbook"
16 xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="polyint">
17 <refnamediv>
18 <refname>polyint</refname>
19 <refpurpose>
20 Polynomial integration
21 </refpurpose>
22 </refnamediv>
23 <refsynopsisdiv>
24 <title>Syntax</title>
25 <synopsis>
26 polyint // example
27 Q = polyint(P)
28 Q = polyint(P, Const)
29 </synopsis>
30 </refsynopsisdiv>
31 <refsection>
32 <title>Arguments</title>
33 <variablelist>
34 <varlistentry>
35 <term>P, Q</term>
36 <listitem>
37 arrays (from scalars to hypermatrices) of polynomials with real or complex
38 coefficients, of same size.
39 <para/>
40 </listitem>
41 </varlistentry>
42 <varlistentry>
43 <term>Const</term>
44 <listitem>
45 Set of real or complex constants of integration.
46 <literal>length(Const)</literal> sets the number of consecutive integrations
47 to perform. By default, 0 is used.
48 <varname>Const</varname> can be one of the following:
49 <itemizedlist>
50 <listitem>
51 a scalar: then only the first antiderivatives are computed, and all use
52 the same <varname>Const</varname> value.
53 </listitem>
54 <listitem>
55 an array of size size(P): then only the first antiderivatives are computed,
56 with the respective <literal>Const(i)</literal> for <literal>Q(i)</literal>.
57 </listitem>
58 <listitem>
59 a list that can mix scalars, arrays of size size(P), or undefined elements.
60 Then <literal>Const(i)</literal> is used for the i<superscript>th</superscript>
61 antiderivatives. Undefined elements are equivalent to 0.
62 </listitem>
63 </itemizedlist>
64 <para/>
65 </listitem>
66 </varlistentry>
67 </variablelist>
68 </refsection>
69 <refsection>
70 <title>Description</title>
71 <para>
72 polyint(..) computes the first or any n<superscript>th</superscript> antiderivative
73 of each polynomial of the input array.
74 </para>
75 </refsection>
76 <refsection>
77 <title>Examples</title>
78 <para>
79 Single integration (first order):
80 </para>
81 <programlisting role="example"><![CDATA[
82s = %s;
83P = [-2, s ; s^2-3, s-2*s^3]
84polyint(P)
85polyint(P, 1)
86polyint(P, [1 2 ; 3 4])
87 ]]></programlisting>
88 <screen><![CDATA[
89--> P = [-2, s ; s^2-3, s-2*s^3]
90 P =
91 -2 s
92 -3 +s² s -2s³
93
94--> polyint(P)
95 ans =
96 -2s 0.5s²
97 -3s +0.3333333s³ 0.5s² -0.5s⁴
98
99--> polyint(P, 1)
100 ans =
101 1 -2s 1 +0.5s²
102 1 -3s +0.3333333s³ 1 +0.5s² -0.5s⁴
103
104--> polyint(P, [1 2 ; 3 4])
105 ans =
106 1 -2s 2 +0.5s²
107 3 -3s +0.3333333s³ 4 +0.5s² -0.5s⁴
108]]></screen>
109 <para/>
110 <para>
111 Multiple integrations:
112 </para>
113 <programlisting role="example"><![CDATA[
114s = %s;
115polyint(1-3*s, list(-1,1))
116P = [3 ; 1-s ; 6*s^2-2]
117polyint(P, list(2, [-2 1 0]))
118polyint(P, list(, [-2 1 0]))
119
120k = list(); k(5) = 0;
121polyint(1+0*s, k)
1221 / factorial(5)
123 ]]></programlisting>
124 <screen><![CDATA[
125--> polyint(1-3*s, list(-1,1))
126 ans =
127 1 -s +0.5s² -0.5s³
128
129--> P = [3 ; 1-s ; 6*s^2-2]
130 P =
131 3
132 1 -s
133 -2 +6s²
134
135--> polyint(P, list(2, [-2 1 0]))
136 ans =
137 -2 +2s +1.5s²
138 1 +2s +0.5s² -0.1666667s³
139 2s -s² +0.5s⁴
140
141--> polyint(P, list(, [-2 1 0]))
142 ans =
143 -2 +1.5s²
144 1 +0.5s² -0.1666667s³
145 -s² +0.5s⁴
146
147
148--> k = list(); k(5) = 0;
149--> polyint(1+0*s, k)
150 ans =
151 0.0083333s⁵
152
153--> 1 / factorial(5)
154 ans =
155 0.0083333
156]]></screen>
157 </refsection>
158 <refsection role="see also">
159 <title>See also</title>
160 <simplelist type="inline">
161 <member>
162 <link linkend="derivat">derivat</link>
163 </member>
164 </simplelist>
165 </refsection>
166 <refsection role="history">
167 <title>History</title>
168 <revhistory>
169 <revision>
170 <revnumber>6.1.1</revnumber>
171 <revdescription>
172 polyint() introduced.
173 </revdescription>
174 </revision>
175 </revhistory>
176 </refsection>
177</refentry>
diff --git a/scilab/modules/polynomials/help/en_US/rational.xml b/scilab/modules/polynomials/help/en_US/rational.xml
deleted file mode 100644
index 8e13484..0000000
--- a/scilab/modules/polynomials/help/en_US/rational.xml
+++ /dev/null
@@ -1,137 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2005 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2018 - Samuel GOUGEON
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
16<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="rational">
17 <refnamediv>
18 <refname>rational</refname>
19 <refpurpose>rational fractions</refpurpose>
20 </refnamediv>
21 <refsection>
22 <title>Description</title>
23 <para>
24 A rational <literal>r</literal> is the quotient of two polynomials <literal>r=num/den</literal>.
25 </para>
26 <para>
27 An array <literal>R</literal> of rationals can be directly defined as the elementwise
28 quotient of two polynomials arrays <literal>Num</literal> and <literal>Den</literal> :
29 <literal>R = Num./Den</literal>.
30 </para>
31 <para>
32 The internal representation of a rational is a list of type "r":
33 <literal>R = tlist(['r','num','den','dt'], Num, Den,[])</literal>, or
34 <literal>R = rlist(Num, Den, [])</literal>.
35 </para>
36 <para>
37 All usual operators can be used with arrays of rationals:
38 <literal>' .' + - * .* / ./ .^ .*. [,] [;]</literal>,
39 </para>
40 <para>
41 As for polynomials, the <literal>horner()</literal> function allows to compute
42 the value of rationals for some value of their variable.
43 </para>
44 <para>
45 Many other Scilab functions can be used with rationals input : <literal>permute</literal>,
46 <literal>cat</literal>, <literal>real</literal>, <literal>imag</literal>,
47 <literal>conj</literal>, <literal>isreal</literal>, etc.
48 </para>
49 <warning>
50 Addressing some components of an array <literal>R</literal> of rationals with their
51 linearized indices can be done using the syntax <literal>R(k,0)</literal> where
52 <literal>k</literal> is the vector of linearized indices, and 0 is used instead of
53 <literal>j</literal> or higher order indices.
54 </warning>
55 </refsection>
56 <refsection>
57 <title>Examples</title>
58 <programlisting role="example"><![CDATA[
59s=poly(0,'s');
60W=[1/s,1/(s+1)]
61W'*W
62Num=[s,s+2;1,s];Den=[s*s,s;s,s*s];
63rlist(Num,Den,[])
64H=Num./Den
65syslin('c',Num,Den)
66syslin('c',H)
67[Num1,Den1]=simp(Num,Den)
68 ]]></programlisting>
69 <para/>
70 <programlisting role="example"><![CDATA[
71R = (1-%s).^[1 0 2] ./ %s.^[1 2 0]
72horner(R,[-1 0 2 -2]')
73
74R = (1-%s)/(1+%s)
75horner(R, 1-%z^2)
76 ]]></programlisting>
77 <screen><![CDATA[
78--> R = (1-%s).^[1 0 2] ./ %s.^[1 2 0]
79 R =
80 2
81 1 - s 1 1 - 2s + s
82 ------ -- -----------
83 2
84 s s 1
85
86--> horner(R,[-1 0 2 -2]')
87 ans =
88 -2. 1. 4.
89 Inf Inf 1.
90 -0.5 0.25 1.
91 -1.5 0.25 9.
92
93--> R = (1-%s)/(1+%s)
94 R =
95 1 - s
96 ------
97 1 + s
98
99--> horner(R, 1-%z^2)
100 ans =
101 2
102 z
103 ------
104 2
105 2 - z
106]]></screen>
107 </refsection>
108 <refsection role="see also">
109 <title>See also</title>
110 <simplelist type="inline">
111 <member>
112 <link linkend="poly">poly</link>
113 </member>
114 <member>
115 <link linkend="syslin">syslin</link>
116 </member>
117 <member>
118 <link linkend="horner">horner</link>
119 </member>
120 <member>
121 <link linkend="simp">simp</link>
122 </member>
123 </simplelist>
124 </refsection>
125 <refsection role="history">
126 <title>History</title>
127 <revhistory>
128 <revision>
129 <revnumber>6.0.2</revnumber>
130 <revdescription>
131 The syntax <literal>R(k,0)</literal> is now available to address components
132 with their linearized indices k.
133 </revdescription>
134 </revision>
135 </revhistory>
136 </refsection>
137</refentry>
diff --git a/scilab/modules/polynomials/help/en_US/residu.xml b/scilab/modules/polynomials/help/en_US/residu.xml
index bad5e4f..8097fe0 100644
--- a/scilab/modules/polynomials/help/en_US/residu.xml
+++ b/scilab/modules/polynomials/help/en_US/residu.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[V]=residu(P,Q1,Q2)</synopsis> 23 <synopsis>V = residu(P, Q1, Q2)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
diff --git a/scilab/modules/polynomials/help/en_US/roots.xml b/scilab/modules/polynomials/help/en_US/roots.xml
index 54336db..5b7ed46 100644
--- a/scilab/modules/polynomials/help/en_US/roots.xml
+++ b/scilab/modules/polynomials/help/en_US/roots.xml
@@ -17,13 +17,13 @@
17<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="roots" xml:lang="en"> 17<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="roots" xml:lang="en">
18 <refnamediv> 18 <refnamediv>
19 <refname>roots</refname> 19 <refname>roots</refname>
20 <refpurpose>roots of polynomials</refpurpose> 20 <refpurpose>roots of a polynomial</refpurpose>
21 </refnamediv> 21 </refnamediv>
22 <refsynopsisdiv> 22 <refsynopsisdiv>
23 <title>Syntax</title> 23 <title>Syntax</title>
24 <synopsis> 24 <synopsis>
25 x=roots(p) 25 x = roots(p)
26 x=roots(p,algo) 26 x = roots(p, 'e')
27 </synopsis> 27 </synopsis>
28 </refsynopsisdiv> 28 </refsynopsisdiv>
29 <refsection> 29 <refsection>
@@ -33,21 +33,29 @@
33 <term>p</term> 33 <term>p</term>
34 <listitem> 34 <listitem>
35 <para> 35 <para>
36 a polynomial with real or complex coefficients, or 36 a polynomial with real or complex coefficients, or a vector
37 a m-by-1 or 1-by-m matrix of doubles, the polynomial coefficients in decreasing degree order. 37 of the real or complex polynomial coefficients in
38 decreasing power order.
38 </para> 39 </para>
39 </listitem> 40 </listitem>
40 </varlistentry> 41 </varlistentry>
41 <varlistentry> 42 <varlistentry>
42 <term>algo</term> 43 <term>'e', algo</term>
43 <listitem> 44 <listitem>
44 <para> 45 <para>
45 a string, the algorithm to be used (default algo="e"). 46 a character: the algorithm to be used (default "f", for "fast"):
46 If algo="e", then the eigenvalues of the companion matrix are returned. 47 <table>
47 If algo="f", then the Jenkins-Traub method is used (if the polynomial is real and 48 <tr><th>"f":</th>
48 has degree lower than 100). 49 <td>
49 If algo="f" and the polynomial is complex, then an error is generated. 50 The Jenkins-Traub method is used. The polynomial must be real
50 If algo="f" and the polynomial has degree greater than 100, then an error is generated. 51 and of degree &lt; 100; otherwise, an error is yielded.
52 </td>
53 </tr>
54 <tr><th>"e":</th>
55 <td>eigenvalues of the companion matrix are returned.
56 </td>
57 </tr>
58 </table>
51 </para> 59 </para>
52 </listitem> 60 </listitem>
53 </varlistentry> 61 </varlistentry>
@@ -60,14 +68,14 @@
60 <literal>x</literal> the roots of the polynomial <literal>p</literal>. 68 <literal>x</literal> the roots of the polynomial <literal>p</literal>.
61 </para> 69 </para>
62 <para> 70 <para>
63 The "e" option corresponds to method based on the eigenvalues of the
64 companion matrix.
65 </para>
66 <para>
67 The "f" option corresponds to the fast RPOLY algorithm, based on 71 The "f" option corresponds to the fast RPOLY algorithm, based on
68 Jenkins-Traub method. 72 Jenkins-Traub method.
69 </para> 73 </para>
70 <para> 74 <para>
75 The "e" option corresponds to method based on the eigenvalues of the
76 companion matrix.
77 </para>
78 <para>
71 For real polynomials of degree &lt;=100, users may consider the "f" option, 79 For real polynomials of degree &lt;=100, users may consider the "f" option,
72 which might be faster in some cases. 80 which might be faster in some cases.
73 On the other hand, some specific polynomials are known to be able to 81 On the other hand, some specific polynomials are known to be able to
@@ -86,17 +94,17 @@
86p = poly([1 2 3],"x") 94p = poly([1 2 3],"x")
87roots(p) 95roots(p)
88// Roots, given the real coefficients 96// Roots, given the real coefficients
89p = [3 2 1] 97p = [3 2 1];
90roots(p) 98roots(p)
91// The roots of a complex polynomial 99// The roots of a complex polynomial
92p=poly([0,10,1+%i,1-%i],'x'); 100p = poly([0,10,1+%i,1-%i],'x');
93roots(p) 101roots(p)
94// The roots of the polynomial of a matrix 102// The roots of the polynomial of a matrix
95A=rand(3,3); 103A = rand(3,3);
96p = poly(A,'x') 104p = poly(A,'x')
97roots(p) 105roots(p)
98spec(A) 106spec(A)
99 ]]></programlisting> 107 ]]></programlisting>
100 <para> 108 <para>
101 The polynomial representation can have a significant 109 The polynomial representation can have a significant
102 impact on the roots. 110 impact on the roots.
@@ -113,7 +121,7 @@ spec(A)
113A = diag(1:20); 121A = diag(1:20);
114p = poly(A,'x') 122p = poly(A,'x')
115roots(p) 123roots(p)
116 ]]></programlisting> 124 ]]></programlisting>
117 <para> 125 <para>
118 The "f" option produces an error if the polynomial is complex or 126 The "f" option produces an error if the polynomial is complex or
119 if the degree is greater than 100. 127 if the degree is greater than 100.
@@ -125,7 +133,7 @@ roots(p)
125 // The following case produces an error. 133 // The following case produces an error.
126 p = ones(101,1); 134 p = ones(101,1);
127 roots(p,"f") 135 roots(p,"f")
128 ]]></programlisting> 136 ]]></programlisting>
129 <para> 137 <para>
130 The following script is a simple way of checking that the companion matrix gives the same result as the "e" option. 138 The following script is a simple way of checking that the companion matrix gives the same result as the "e" option.
131 It explicitly uses the companion matrix to compute the roots. 139 It explicitly uses the companion matrix to compute the roots.
@@ -141,7 +149,20 @@ p = poly(v(dv:-1:1),"x","coeff"); // Reversing v's coefficients
141A = companion(p); 149A = companion(p);
142r2 = spec(A); // With the companion matrix 150r2 = spec(A); // With the companion matrix
143max(abs(r1-r2)) 151max(abs(r1-r2))
144 ]]></programlisting> 152 ]]></programlisting>
153 </refsection>
154 <refsection>
155 <title>References</title>
156 <para>
157 The RPOLY algorithm is described in "Algorithm 493: Zeros of a Real
158 Polynomial", ACM TOMS Volume 1, Issue 2 (June 1975), pp. 178-189
159 </para>
160 <para>Jenkins, M. A. and Traub, J. F. (1970), A Three-Stage Algorithm for
161 Real Polynomials Using Quadratic Iteration, SIAM J. Numer. Anal., 7(1970), 545-566.
162 </para>
163 <para>Jenkins, M. A. and Traub, J. F. (1970), Principles for Testing Polynomial Zerofinding Programs.
164 ACM TOMS 1, 1 (March 1975), pp. 26-34
165 </para>
145 </refsection> 166 </refsection>
146 <refsection role="see also"> 167 <refsection role="see also">
147 <title>See also</title> 168 <title>See also</title>
@@ -157,17 +178,4 @@ max(abs(r1-r2))
157 </member> 178 </member>
158 </simplelist> 179 </simplelist>
159 </refsection> 180 </refsection>
160 <refsection>
161 <title>References</title>
162 <para>
163 The RPOLY algorithm is described in "Algorithm 493: Zeros of a Real
164 Polynomial", ACM TOMS Volume 1, Issue 2 (June 1975), pp. 178-189
165 </para>
166 <para>Jenkins, M. A. and Traub, J. F. (1970), A Three-Stage Algorithm for
167 Real Polynomials Using Quadratic Iteration, SIAM J. Numer. Anal., 7(1970), 545-566.
168 </para>
169 <para>Jenkins, M. A. and Traub, J. F. (1970), Principles for Testing Polynomial Zerofinding Programs.
170 ACM TOMS 1, 1 (March 1975), pp. 26-34
171 </para>
172 </refsection>
173</refentry> 181</refentry>
diff --git a/scilab/modules/polynomials/help/en_US/rowcompr.xml b/scilab/modules/polynomials/help/en_US/rowcompr.xml
index 162eb60..6c3f71d 100644
--- a/scilab/modules/polynomials/help/en_US/rowcompr.xml
+++ b/scilab/modules/polynomials/help/en_US/rowcompr.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[X,rk,Ac]=rowcompr(A)</synopsis> 23 <synopsis>[X, rk, Ac] = rowcompr(A)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
diff --git a/scilab/modules/polynomials/help/en_US/sfact.xml b/scilab/modules/polynomials/help/en_US/sfact.xml
index ccd8dd7..ea94346 100644
--- a/scilab/modules/polynomials/help/en_US/sfact.xml
+++ b/scilab/modules/polynomials/help/en_US/sfact.xml
@@ -20,7 +20,7 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>F=sfact(P)</synopsis> 23 <synopsis>F = sfact(P)</synopsis>
24 </refsynopsisdiv> 24 </refsynopsisdiv>
25 <refsection> 25 <refsection>
26 <title>Arguments</title> 26 <title>Arguments</title>
@@ -28,7 +28,7 @@
28 <varlistentry> 28 <varlistentry>
29 <term>P</term> 29 <term>P</term>
30 <listitem> 30 <listitem>
31 <para>real polynomial matrix</para> 31 <para>Square matrix of real polynomials.</para>
32 </listitem> 32 </listitem>
33 </varlistentry> 33 </varlistentry>
34 </variablelist> 34 </variablelist>
@@ -49,14 +49,14 @@
49 <literal>P = F(z)* F(1/z) *z^n</literal> 49 <literal>P = F(z)* F(1/z) *z^n</literal>
50 </para> 50 </para>
51 <para> 51 <para>
52 For scalar polynomials a specific algorithm is implemented. 52 For a single polynomial, a specific algorithm is implemented.
53 Algorithms are adapted from Kucera's book. 53 Algorithms are adapted from Kucera's book.
54 </para> 54 </para>
55 </refsection> 55 </refsection>
56 <refsection> 56 <refsection>
57 <title>Examples</title> 57 <title>Examples</title>
58 <programlisting role="example"><![CDATA[ 58 <programlisting role="example"><![CDATA[
59// Simple polynomial example 59// Single polynomial example
60p = (%z -1/2) * (2 - %z) 60p = (%z -1/2) * (2 - %z)
61w = sfact(p); 61w = sfact(p);
62w*horner(w, 1/%z).num 62w*horner(w, 1/%z).num
diff --git a/scilab/modules/polynomials/help/en_US/simp.xml b/scilab/modules/polynomials/help/en_US/simp.xml
index e1e4a68..436c674 100644
--- a/scilab/modules/polynomials/help/en_US/simp.xml
+++ b/scilab/modules/polynomials/help/en_US/simp.xml
@@ -20,15 +20,16 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>[N1,D1]=simp(N,D) 23 <synopsis>
24 H1=simp(H) 24 [N1,D1] = simp(N,D)
25 H1 = simp(H)
25 </synopsis> 26 </synopsis>
26 </refsynopsisdiv> 27 </refsynopsisdiv>
27 <refsection> 28 <refsection>
28 <title>Arguments</title> 29 <title>Arguments</title>
29 <variablelist> 30 <variablelist>
30 <varlistentry> 31 <varlistentry>
31 <term>N,D</term> 32 <term>N, D</term>
32 <listitem> 33 <listitem>
33 <para>real polynomials or real matrix polynomials</para> 34 <para>real polynomials or real matrix polynomials</para>
34 </listitem> 35 </listitem>
@@ -59,54 +60,55 @@
59 </para> 60 </para>
60 <para> 61 <para>
61 <warning> 62 <warning>
62 Caution: 63 <itemizedlist>
64 <listitem>
65 no threshold is given, i.e. <literal>simp</literal> cannot forces a
66 simplification.
67 </listitem>
68 <listitem>
69 For linear dynamic systems which include integrator(s) simplification
70 changes the static gain. (<literal>H(0)</literal> for continuous systems or
71 <literal>H(1)</literal> for discrete systems).
72 </listitem>
73 <listitem>
74 For complex data, <literal>simp</literal> returns its input(s).
75 </listitem>
76 <listitem>
77 Rational simplification is called after nearly each operations on
78 rationals. It is possible to toggle simplification on or off using
79 <literal>simp_mode</literal> function.
80 </listitem>
81 </itemizedlist>
63 </warning> 82 </warning>
64 </para> 83 </para>
65 <para>
66 -no threshold is given i.e. <literal>simp</literal> cannot forces a
67 simplification.
68 </para>
69 <para>
70 -For linear dynamic systems which include integrator(s) simplification
71 changes the static gain. (<literal>H(0)</literal> for continuous systems or <literal>H(1)</literal> for
72 discrete systems)
73 </para>
74 <para>
75 -for complex data, <literal>simp</literal> returns its input(s).
76 </para>
77 <para>
78 -rational simplification is called after nearly each operations on
79 rationals. It is possible to toggle simplification on or off using
80 <literal>simp_mode</literal> function.
81 </para>
82 </refsection> 84 </refsection>
83 <refsection> 85 <refsection>
84 <title>Examples</title> 86 <title>Examples</title>
85 <programlisting role="example"><![CDATA[ 87 <programlisting role="example"><![CDATA[
86s=poly(0,'s'); 88s = poly(0,'s');
87[n,d]=simp((s+1)*(s+2),(s+1)*(s-2)) 89[n,d] = simp((s+1)*(s+2),(s+1)*(s-2))
88 90
89simp_mode(%F);hns=s/s 91simp_mode(%F); hns = s/s
90simp_mode(%T);hns=s/s 92simp_mode(%T); hns = s/s
91 ]]></programlisting> 93 ]]></programlisting>
92 </refsection> 94 </refsection>
93 <refsection role="see also"> 95 <refsection role="see also">
94 <title>See also</title> 96 <title>See also</title>
95 <simplelist type="inline"> 97 <simplelist type="inline">
96 <member> 98 <member>
97 <link linkend="roots">roots</link> 99 <link linkend="simp_mode">simp_mode</link>
98 </member> 100 </member>
99 <member> 101 <member>
100 <link linkend="trfmod">trfmod</link> 102 <link linkend="clean">clean</link>
101 </member> 103 </member>
102 <member> 104 <member>
103 <link linkend="poly">poly</link> 105 <link linkend="roots">roots</link>
104 </member> 106 </member>
105 <member> 107 <member>
106 <link linkend="clean">clean</link> 108 <link linkend="trfmod">trfmod</link>
107 </member> 109 </member>
108 <member> 110 <member>
109 <link linkend="simp_mode">simp_mode</link> 111 <link linkend="poly">poly</link>
110 </member> 112 </member>
111 </simplelist> 113 </simplelist>
112 </refsection> 114 </refsection>
diff --git a/scilab/modules/polynomials/help/en_US/simp_mode.xml b/scilab/modules/polynomials/help/en_US/simp_mode.xml
index e5622d7..dfb84fb 100644
--- a/scilab/modules/polynomials/help/en_US/simp_mode.xml
+++ b/scilab/modules/polynomials/help/en_US/simp_mode.xml
@@ -20,7 +20,8 @@
20 </refnamediv> 20 </refnamediv>
21 <refsynopsisdiv> 21 <refsynopsisdiv>
22 <title>Syntax</title> 22 <title>Syntax</title>
23 <synopsis>mod=simp_mode() 23 <synopsis>
24 mod = simp_mode()
24 simp_mode(mod) 25 simp_mode(mod)
25 </synopsis> 26 </synopsis>
26 </refsynopsisdiv> 27 </refsynopsisdiv>
@@ -56,12 +57,29 @@
56 <refsection> 57 <refsection>
57 <title>Examples</title> 58 <title>Examples</title>
58 <programlisting role="example"><![CDATA[ 59 <programlisting role="example"><![CDATA[
59s=poly(0,'s'); 60s = %s;
60mod=simp_mode() 61mod = simp_mode()
61simp_mode(%f);hns=s/s 62simp_mode(%f); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2]
62simp_mode(%t);hns=s/s 63simp_mode(%t); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2]
63simp_mode(mod); 64simp_mode(mod);
64 ]]></programlisting> 65 ]]></programlisting>
66 <screen><![CDATA[
67--> mod = simp_mode()
68 mod =
69 T
70
71--> simp_mode(%f); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2]
72 ans =
73 0 s s² s² -2s³ +s⁴ s -s²
74 - - -- ----------- -----------
75 s s s s -s² s² -2s³ +s⁴
76
77--> simp_mode(%t); [0/s, s/s, s^2/s, (s*(1-s))^2/(s-s^2), (s-s^2)/(s*(1-s))^2]
78 ans =
79 0 1 s s -s² -1
80 - - - ----- ------
81 1 1 1 1 -s +s²
82]]></screen>
65 </refsection> 83 </refsection>
66 <refsection role="see also"> 84 <refsection role="see also">
67 <title>See also</title> 85 <title>See also</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/cmndred.xml b/scilab/modules/polynomials/help/fr_FR/cmndred.xml
index ee28034..32a6472 100644
--- a/scilab/modules/polynomials/help/fr_FR/cmndred.xml
+++ b/scilab/modules/polynomials/help/fr_FR/cmndred.xml
@@ -6,7 +6,7 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[n,d]=cmndred(num,den)</synopsis> 9 <synopsis>[n, d] = cmndred(num, den)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/coeff.xml b/scilab/modules/polynomials/help/fr_FR/coeff.xml
index f87cb42..ff8d056 100644
--- a/scilab/modules/polynomials/help/fr_FR/coeff.xml
+++ b/scilab/modules/polynomials/help/fr_FR/coeff.xml
@@ -6,7 +6,10 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Syntaxe</title> 8 <title>Syntaxe</title>
9 <synopsis>C = coeff(Mp [,v])</synopsis> 9 <synopsis>
10 C = coeff(Mp)
11 C = coeff(Mp, degrees)
12 </synopsis>
10 </refsynopsisdiv> 13 </refsynopsisdiv>
11 <refsection role="parameters"> 14 <refsection role="parameters">
12 <title>Paramètres</title> 15 <title>Paramètres</title>
@@ -19,16 +22,16 @@
19 </listitem> 22 </listitem>
20 </varlistentry> 23 </varlistentry>
21 <varlistentry> 24 <varlistentry>
22 <term>v </term> 25 <term>degrees</term>
23 <listitem> 26 <listitem>
24 <para>vecteur (ligne ou colonne) d'entiers des degrés choisis 27 <para>vecteur (ligne ou colonne) d'entiers des degrés des coefficients choisis.
25 </para> 28 </para>
26 </listitem> 29 </listitem>
27 </varlistentry> 30 </varlistentry>
28 <varlistentry> 31 <varlistentry>
29 <term>C </term> 32 <term>C </term>
30 <listitem> 33 <listitem>
31 <para>grosse matrice de coefficients 34 <para>grande matrice de coefficients.
32 </para> 35 </para>
33 </listitem> 36 </listitem>
34 </varlistentry> 37 </varlistentry>
@@ -45,15 +48,15 @@
45 <literal>k = max(degree(Mp))</literal> 48 <literal>k = max(degree(Mp))</literal>
46 </para> 49 </para>
47 <para> 50 <para>
48 <literal>C = coeff(Mp,v)</literal> renvoie la matrice des coefficients des termes dont 51 <literal>C = coeff(Mp,degrees)</literal> renvoie la matrice des coefficients des termes
49 les degrés sont indiqués dans <literal>v</literal>. 52 dont les degrés sont indiqués dans <literal>degrees</literal>.
50 </para> 53 </para>
51 </refsection> 54 </refsection>
52 <refsection role="examples"> 55 <refsection role="examples">
53 <title>Exemples</title> 56 <title>Exemples</title>
54 <programlisting role="example"><![CDATA[ 57 <programlisting role="example"><![CDATA[
55s=poly(0,'s'); 58s = %s;
56w=s*rand(10,10); 59w = s*rand(10,10);
57determ(w) 60determ(w)
58coeff(w,1) 61coeff(w,1)
59 62
@@ -62,7 +65,7 @@ coeff(r)
62 65
63r = poly([-1-%i -1+2*%i 0],'s',"roots"); 66r = poly([-1-%i -1+2*%i 0],'s',"roots");
64coeff(r) 67coeff(r)
65 ]]></programlisting> 68 ]]></programlisting>
66 </refsection> 69 </refsection>
67 70
68 <refsection role="see also"> 71 <refsection role="see also">
diff --git a/scilab/modules/polynomials/help/fr_FR/colcompr.xml b/scilab/modules/polynomials/help/fr_FR/colcompr.xml
index 7fc76c8..9f1dbf2 100644
--- a/scilab/modules/polynomials/help/fr_FR/colcompr.xml
+++ b/scilab/modules/polynomials/help/fr_FR/colcompr.xml
@@ -6,7 +6,7 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[Y,rk,ac]=colcompr(A);</synopsis> 9 <synopsis>[Y, rk, ac] = colcompr(A)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
@@ -52,11 +52,32 @@
52 <refsection> 52 <refsection>
53 <title>Exemples</title> 53 <title>Exemples</title>
54 <programlisting role="example"><![CDATA[ 54 <programlisting role="example"><![CDATA[
55s=poly(0,'s'); 55s = %s;
56p=[s;s*(s+1)^2;2*s^2+s^3]; 56p = [s ; s*(s+1)^2 ; 2*s^2+s^3]
57[Y,rk,ac]=colcompr(p*p'); 57[Y, rk, ac] = colcompr(p*p');
58p*p'*Y 58Y
59 ]]></programlisting> 59clean(ac)
60 ]]></programlisting>
61 <screen><![CDATA[
62--> p = [s ; s*(s+1)^2 ; 2*s^2+s^3]
63 p =
64 s
65 s +2s² +s³
66 2s² +s³
67
68--> [Y, rk, ac] = colcompr(p*p');
69--> Y
70 Y =
71 1 +2s +s² 2s +s² 1
72 -1 0 0
73 0 -1 0
74
75--> clean(ac)
76 ans =
77 0 0 s²
78 0 0 s² +2s³ +s⁴
79 0 0 2s³ +s⁴
80 ]]></screen>
60 </refsection> 81 </refsection>
61 <refsection role="see also"> 82 <refsection role="see also">
62 <title>Voir aussi</title> 83 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/derivat.xml b/scilab/modules/polynomials/help/fr_FR/derivat.xml
index 4596a58..828e24c 100644
--- a/scilab/modules/polynomials/help/fr_FR/derivat.xml
+++ b/scilab/modules/polynomials/help/fr_FR/derivat.xml
@@ -1,20 +1,34 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="derivat"> 16<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="fr" xml:id="derivat">
3 <refnamediv> 17 <refnamediv>
4 <refname>derivat</refname> 18 <refname>derivat</refname>
5 <refpurpose>dérivée d'une matrice de polynômes </refpurpose> 19 <refpurpose>dérivée de polynômes ou de fractions rationnelles</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
9 <synopsis>pd=derivat(p)</synopsis> 23 <synopsis>pd = derivat(p)</synopsis>
10 </refsynopsisdiv> 24 </refsynopsisdiv>
11 <refsection> 25 <refsection>
12 <title>Paramètres</title> 26 <title>Paramètres</title>
13 <variablelist> 27 <variablelist>
14 <varlistentry> 28 <varlistentry>
15 <term>p </term> 29 <term>p, pd</term>
16 <listitem> 30 <listitem>
17 <para>polynôme, matrice de polynômes ou de fractions rationnelles 31 <para>tableaux de polynômes ou de fractions rationnelles.
18 </para> 32 </para>
19 </listitem> 33 </listitem>
20 </varlistentry> 34 </varlistentry>
@@ -30,7 +44,7 @@
30 <refsection> 44 <refsection>
31 <title>Exemples</title> 45 <title>Exemples</title>
32 <programlisting role="example"><![CDATA[ 46 <programlisting role="example"><![CDATA[
33s=poly(0,'s'); 47s = poly(0,'s');
34derivat(1/s) // -1/s^2; 48derivat(1/s) // -1/s^2;
35 ]]></programlisting> 49 ]]></programlisting>
36 <programlisting role="example"><![CDATA[ 50 <programlisting role="example"><![CDATA[
@@ -54,4 +68,12 @@ s = %s; p5 = s^(-1) + 2 + 3*s
54derivat(p5) 68derivat(p5)
55 ]]></programlisting> 69 ]]></programlisting>
56 </refsection> 70 </refsection>
71 <refsection role="see also">
72 <title>Voir aussi</title>
73 <simplelist type="inline">
74 <member>
75 <link linkend="polyint">polyint</link>
76 </member>
77 </simplelist>
78 </refsection>
57</refentry> 79</refentry>
diff --git a/scilab/modules/polynomials/help/fr_FR/determ.xml b/scilab/modules/polynomials/help/fr_FR/determ.xml
index cd42bbf..dbb7e38 100644
--- a/scilab/modules/polynomials/help/fr_FR/determ.xml
+++ b/scilab/modules/polynomials/help/fr_FR/determ.xml
@@ -1,12 +1,29 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA - Francois DELBECQUE
5 *
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="determ"> 16<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="fr" xml:id="determ">
3 <refnamediv> 17 <refnamediv>
4 <refname>determ</refname> 18 <refname>determ</refname>
5 <refpurpose>déterminant d'une matrice de polynômes </refpurpose> 19 <refpurpose>déterminant d'une matrice de polynômes</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
9 <synopsis>res=determ(W [,k])</synopsis> 23 <synopsis>
24 res = determ(W)
25 res = determ(W, k)
26 </synopsis>
10 </refsynopsisdiv> 27 </refsynopsisdiv>
11 <refsection> 28 <refsection>
12 <title>Paramètres</title> 29 <title>Paramètres</title>
@@ -14,7 +31,7 @@
14 <varlistentry> 31 <varlistentry>
15 <term>W </term> 32 <term>W </term>
16 <listitem> 33 <listitem>
17 <para>matrice réelle de polynômes 34 <para>matrice carrée de polynômes à coefficients réels ou complexes
18 </para> 35 </para>
19 </listitem> 36 </listitem>
20 </varlistentry> 37 </varlistentry>
@@ -31,8 +48,7 @@
31 <title>Description</title> 48 <title>Description</title>
32 <para> 49 <para>
33 <literal>res=determ(W [,k])</literal> renvoie le déterminant d'une 50 <literal>res=determ(W [,k])</literal> renvoie le déterminant d'une
34 matrice réelle de polynômes (calculs fait par FFT si la taille de W 51 matrice de polynômes.
35 est supérieure à 2*2).
36 </para> 52 </para>
37 <para> 53 <para>
38 <literal>k</literal> est un entier plus grand que le degré effectif du 54 <literal>k</literal> est un entier plus grand que le degré effectif du
@@ -43,19 +59,31 @@
43 puissance de 2 plus grande que <literal>n*max(degree(W))</literal>. 59 puissance de 2 plus grande que <literal>n*max(degree(W))</literal>.
44 </para> 60 </para>
45 <para> 61 <para>
46 Méthode (pour les matrices dont la taille est supérieure à 2*2) : évaluation du déterminant de <literal>W</literal> aux 62 Méthode (pour les matrices dont la taille est supérieure à 2*2) : évaluation du
47 fréquences de Fourier et FFT inverse appliquée aux coefficients du 63 déterminant de <literal>W</literal> aux fréquences de Fourier et FFT inverse
48 déterminant. 64 appliquée aux coefficients du déterminant.
49 </para> 65 </para>
50 </refsection> 66 </refsection>
51 <refsection> 67 <refsection>
52 <title>Exemples</title> 68 <title>Exemples</title>
53 <programlisting role="example"><![CDATA[ 69 <programlisting role="example"><![CDATA[
54s=poly(0,'s'); 70s = %s;
55w=s*rand(10,10); 71P = [5+3*s, 1-5*s, -4+6*s ; -3+5*s, -3*s, -9 ; 8*s, -6-2*s, 4-6*s]
56determ(w) 72determ(P)
57det(coeff(w,1))*s^10 73 ]]></programlisting>
58 ]]></programlisting> 74 <screen><![CDATA[
75--> P = [5+3*s, 1-5*s, -4+6*s ; -3+5*s, -3*s, -9 ; 8*s, -6-2*s, 4-6*s]
76 P =
77 5 +3s 1 -5s -4 +6s
78
79 -3 +5s -3s -9
80
81 8s -6 -2s 4 -6s
82
83--> determ(P)
84 ans =
85 -330 -278s +380s² -12s³
86]]></screen>
59 </refsection> 87 </refsection>
60 <refsection role="see also"> 88 <refsection role="see also">
61 <title>Voir aussi</title> 89 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/detr.xml b/scilab/modules/polynomials/help/fr_FR/detr.xml
index 3d98742..ccc47c5 100644
--- a/scilab/modules/polynomials/help/fr_FR/detr.xml
+++ b/scilab/modules/polynomials/help/fr_FR/detr.xml
@@ -2,11 +2,11 @@
2<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="fr" xml:id="detr"> 2<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="fr" xml:id="detr">
3 <refnamediv> 3 <refnamediv>
4 <refname>detr</refname> 4 <refname>detr</refname>
5 <refpurpose>déterminant d'un polynôme </refpurpose> 5 <refpurpose>déterminant d'une matrice de fractions rationnelles ou de polynômes</refpurpose>
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>d=detr(h)</synopsis> 9 <synopsis>d = detr(h)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
@@ -15,7 +15,15 @@
15 <term>h </term> 15 <term>h </term>
16 <listitem> 16 <listitem>
17 <para> 17 <para>
18 matrice carrée de doubles ou de polynômes ou de fractions rationnelles. 18 matrice carrée de fractions rationnelles, ou de polynômes, ou de nombres.
19 </para>
20 </listitem>
21 </varlistentry>
22 <varlistentry>
23 <term>d </term>
24 <listitem>
25 <para>
26 scalaire du type de <varname>h</varname> : son déterminant.
19 </para> 27 </para>
20 </listitem> 28 </listitem>
21 </varlistentry> 29 </varlistentry>
@@ -24,8 +32,8 @@
24 <refsection> 32 <refsection>
25 <title>Description</title> 33 <title>Description</title>
26 <para> 34 <para>
27 <literal>d=detr(h)</literal> renvoie le déterminant <literal>d</literal> de la 35 <literal>d=detr(h)</literal> calcule et fournit le déterminant <literal>d</literal>
28 matrice <literal>h</literal>. Basé sur l'algorithme de Leverrier. 36 de la matrice <literal>h</literal>, selon l'algorithme de Leverrier.
29 </para> 37 </para>
30 </refsection> 38 </refsection>
31 <refsection> 39 <refsection>
@@ -45,10 +53,16 @@ A = [1+x 2 5; 3 4-x 3+x; x^2 1 x];
45detr(A) 53detr(A)
46 54
47// Matrice de fractions rationnelles 55// Matrice de fractions rationnelles
48A = [1/x 2 3; 3 4/x 3/x; 1/x^2 1 1/x]; 56A = [1/x, 2, 3 ; 3, 4/x, 3/x ; 1/x^2, 1, 1/x];
49detr(A) 57detr(A)
50 ]]> 58 ]]></programlisting>
51 </programlisting> 59 <screen><![CDATA[
60--> detr(A)
61 ans =
62 -2 -3x -6x² +9x³
63 ----------------
64
65]]></screen>
52 </refsection> 66 </refsection>
53 <refsection role="see also"> 67 <refsection role="see also">
54 <title>Voir aussi</title> 68 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/factors.xml b/scilab/modules/polynomials/help/fr_FR/factors.xml
index e9712e7..dd24b54 100644
--- a/scilab/modules/polynomials/help/fr_FR/factors.xml
+++ b/scilab/modules/polynomials/help/fr_FR/factors.xml
@@ -1,14 +1,31 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="factors"> 16<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="fr" xml:id="factors">
3 <refnamediv> 17 <refnamediv>
4 <refname>factors</refname> 18 <refname>factors</refname>
5 <refpurpose>factorisation réelle de polynômes </refpurpose> 19 <refpurpose>factorise dans un polynôme ou une fraction rationelle</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
9 <synopsis>[lnum,g]=factors(pol [,'flag']) 23 <synopsis>
10 [lnum,lden,g]=factors(rat [,'flag']) 24 [lnum, gain] = factors(pol)
11 rat=factors(rat,'flag') 25 [lnum, gain] = factors(pol, flag)
26 [lnum, lden, gain] = factors(rat)
27 [lnum, lden, gain] = factors(rat, flag)
28 rat = factors(rat, flag)
12 </synopsis> 29 </synopsis>
13 </refsynopsisdiv> 30 </refsynopsisdiv>
14 <refsection> 31 <refsection>
@@ -17,45 +34,36 @@
17 <varlistentry> 34 <varlistentry>
18 <term>pol </term> 35 <term>pol </term>
19 <listitem> 36 <listitem>
20 <para>polynôme réel 37 polynôme réel.
21 </para> 38 <para/>
22 </listitem> 39 </listitem>
23 </varlistentry> 40 </varlistentry>
24 <varlistentry> 41 <varlistentry>
25 <term>rat </term> 42 <term>rat </term>
26 <listitem> 43 <listitem>
27 <para> 44 fraction rationnelle (<literal>rat=pol1/pol2</literal>).
28 fraction rationnelle (<literal>rat=pol1/pol2</literal>) 45 <para/>
29 </para>
30 </listitem> 46 </listitem>
31 </varlistentry> 47 </varlistentry>
32 <varlistentry> 48 <varlistentry>
33 <term>lnum </term> 49 <term>lnum, lden </term>
34 <listitem> 50 <listitem>
35 <para>liste de polynômes (de degrés 1 ou 2) 51 listes de polynômes (de degrés 1 ou 2).
36 </para> 52 <para/>
37 </listitem> 53 </listitem>
38 </varlistentry> 54 </varlistentry>
39 <varlistentry> 55 <varlistentry>
40 <term>lden </term> 56 <term>gain </term>
41 <listitem> 57 <listitem>
42 <para>liste de polynômes (de degrés 1 ou 2) 58 nombre réel.
43 </para> 59 <para/>
44 </listitem>
45 </varlistentry>
46 <varlistentry>
47 <term>g </term>
48 <listitem>
49 <para>nombre réel
50 </para>
51 </listitem> 60 </listitem>
52 </varlistentry> 61 </varlistentry>
53 <varlistentry> 62 <varlistentry>
54 <term>flag </term> 63 <term>flag </term>
55 <listitem> 64 <listitem>
56 <para> 65 chaîne de caractères, <literal>'c'</literal> ou <literal>'d'</literal>.
57 chaîne de caractères, <literal>'c'</literal> ou <literal>'d'</literal> 66 <para/>
58 </para>
59 </listitem> 67 </listitem>
60 </varlistentry> 68 </varlistentry>
61 </variablelist> 69 </variablelist>
@@ -64,50 +72,65 @@
64 <title>Description</title> 72 <title>Description</title>
65 <para> 73 <para>
66 renvoie les facteurs du polynôme <literal>pol</literal> dans la liste <literal>lnum</literal> 74 renvoie les facteurs du polynôme <literal>pol</literal> dans la liste <literal>lnum</literal>
67 et le "gain" g. 75 et le <varname>gain</varname>.
68 </para> 76 </para>
69 <para> 77 <para>
70 On a pol = g multiplié par le produit des termes de la liste <literal>lnum</literal> 78 On a pol = gain multiplié par le produit des termes de la liste <literal>lnum</literal>
71 (si <literal>flag</literal> n'est pas donné). Si <literal>flag='c'</literal>, on a <literal>|pol(i omega)|</literal> = <literal>|g*prod(lnum_j(i omega)|</literal>. 79 (si <literal>flag</literal> n'est pas donné). Si <literal>flag='c'</literal>, on a
80 <literal>|pol(i omega)|</literal> = <literal>|gain*prod(lnum_j(i omega)|</literal>.
72 Si <literal>flag='d'</literal> alors 81 Si <literal>flag='d'</literal> alors
73 on a <literal>|pol(exp(i omega))|</literal> = <literal>|g*prod(lnum_i(exp(i omega))|</literal>. 82 on a <literal>|pol(exp(i omega))|</literal> = <literal>|gain*prod(lnum_i(exp(i omega))|</literal>.
74 Si l'argument de <literal>factors</literal> est une fraction rationnelle 1x1 <literal>rat=pol1/pol2</literal>, 83 Si l'argument de <literal>factors</literal> est une fraction rationnelle 1x1
84 <literal>rat=pol1/pol2</literal>,
75 les facteurs du numérateur <literal>pol1</literal> et le dénominateur <literal>pol2</literal> 85 les facteurs du numérateur <literal>pol1</literal> et le dénominateur <literal>pol2</literal>
76 sont renvoyés dans les listes <literal>lnum</literal> et <literal>lden</literal>, respectivement. 86 sont renvoyés dans les listes <literal>lnum</literal> et <literal>lden</literal>,
87 respectivement.
77 </para> 88 </para>
78 <para> 89 <para>
79 Le "gain" est renvoyé dans <literal>g</literal>, c'est à dire 90 Le <varname>gain</varname> est tel que
80 rat = g multiplié par (produit des termes dans lnum) / (produit des termes dans lden). 91 rat = gain multiplié par (produit des termes dans lnum) / (produit des termes dans lden).
81 </para> 92 </para>
82 <para> 93 <para>
83 Si <literal>flag</literal> vaut <literal>'c'</literal> (resp. <literal>'d'</literal>), les racines de <literal>pol</literal> 94 Si <literal>flag</literal> vaut <literal>'c'</literal> (resp. <literal>'d'</literal>),
95 les racines de <literal>pol</literal>
84 sont réfléchies par rapport à l'axe imaginaire (resp. le cercle unité), i.e. 96 sont réfléchies par rapport à l'axe imaginaire (resp. le cercle unité), i.e.
85 les facteurs dans <literal>lnum</literal> sont des polynômes stables. 97 les facteurs dans <literal>lnum</literal> sont des polynômes stables.
86 Idem si <literal>factors</literal> est appelé avec des arguments rationnels : 98 Idem si <literal>factors</literal> est appelé avec des arguments rationnels :
87 les termes dans <literal>lnum</literal> et <literal>lden</literal> sont des polynômes stables si 99 les termes dans <literal>lnum</literal> et <literal>lden</literal> sont des polynômes
88 <literal>flag</literal> est donné. <literal>R2=factors(R1,'c')</literal> ou <literal>R2=factors(R1,'d')</literal> 100 stables si <literal>flag</literal> est donné. <literal>R2=factors(R1,'c')</literal> ou
89 avec <literal>R1</literal> une fraction rationnelle ou une liste <literal>syslin</literal> SISO : la sortie <literal>R2</literal> est rationnelle avec un numérateur et un dénominateur stables et 101 <literal>R2=factors(R1,'d')</literal> avec <literal>R1</literal> une fraction
90 de même module que <literal>R1</literal> sur l'axe imaginaire (<literal>'c'</literal>) 102 rationnelle ou une liste <literal>syslin</literal> SISO :
91 ou le cercle unité (<literal>'d'</literal>). 103 la sortie <literal>R2</literal> est rationnelle avec un numérateur et un dénominateur
104 stables et de même module que <literal>R1</literal> sur l'axe imaginaire
105 (<literal>'c'</literal>) ou le cercle unité (<literal>'d'</literal>).
92 </para> 106 </para>
93 </refsection> 107 </refsection>
94 <refsection> 108 <refsection>
95 <title>Exemples</title> 109 <title>Exemples</title>
96 <programlisting role="example"><![CDATA[ 110 <programlisting role="example"><![CDATA[
97n=poly([0.2,2,5],'z'); 111n = poly([0.2,2,5],'z');
98d=poly([0.1,0.3,7],'z'); 112d = poly([0.1,0.3,7],'z');
99R=syslin('d',n,d); 113R = syslin('d',n,d);
100R1=factors(R,'d') 114R1 = factors(R,'d')
101roots(R1('num')) 115roots(R1('num'))
102roots(R1('den')) 116roots(R1('den'))
103w=exp(2*%i*%pi*[0:0.1:1]); 117w = exp(2*%i*%pi*[0:0.1:1]);
104norm(abs(horner(R1,w))-abs(horner(R,w))) 118norm(abs(horner(R1,w)) - abs(horner(R,w)))
105 ]]></programlisting> 119 ]]></programlisting>
106 </refsection> 120 </refsection>
107 <refsection role="see also"> 121 <refsection role="see also">
108 <title>Voir aussi</title> 122 <title>Voir aussi</title>
109 <simplelist type="inline"> 123 <simplelist type="inline">
110 <member> 124 <member>
125 <link linkend="polfact">polfact</link>
126 </member>
127 <member>
128 <link linkend="roots">roots</link>
129 </member>
130 <member>
131 <link linkend="pfss">pfss</link>
132 </member>
133 <member>
111 <link linkend="simp">simp</link> 134 <link linkend="simp">simp</link>
112 </member> 135 </member>
113 </simplelist> 136 </simplelist>
diff --git a/scilab/modules/polynomials/help/fr_FR/hermit.xml b/scilab/modules/polynomials/help/fr_FR/hermit.xml
index 0892293..8d3eec2 100644
--- a/scilab/modules/polynomials/help/fr_FR/hermit.xml
+++ b/scilab/modules/polynomials/help/fr_FR/hermit.xml
@@ -6,7 +6,7 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[Ar,U]=hermit(A)</synopsis> 9 <synopsis>[Ar, U] = hermit(A)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
@@ -52,11 +52,25 @@
52 <refsection> 52 <refsection>
53 <title>Exemples</title> 53 <title>Exemples</title>
54 <programlisting role="example"><![CDATA[ 54 <programlisting role="example"><![CDATA[
55s=poly(0,'s'); 55s = %s;
56p=[s, s*(s+1)^2, 2*s^2+s^3]; 56p = [s, s*(s+1)^2, 2*s^2+s^3];
57[Ar,U]=hermit(p'*p); 57[Ar,U] = hermit(p'*p);
58clean(p'*p*U), det(U) 58clean(p'*p*U)
59 ]]></programlisting> 59det(U)
60 ]]></programlisting>
61 <screen><![CDATA[
62--> clean(p'*p*U)
63 ans =
64 0 0 s²
65
66 0 0 s² +2s³ +s⁴
67
68 0 0 2s³ +s⁴
69
70--> det(U)
71 ans =
72 1
73]]></screen>
60 </refsection> 74 </refsection>
61 <refsection role="see also"> 75 <refsection role="see also">
62 <title>Voir aussi</title> 76 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/horner.xml b/scilab/modules/polynomials/help/fr_FR/horner.xml
index 52dcd06..49d33c6 100644
--- a/scilab/modules/polynomials/help/fr_FR/horner.xml
+++ b/scilab/modules/polynomials/help/fr_FR/horner.xml
@@ -1,8 +1,22 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="horner"> 16<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="fr" xml:id="horner">
3 <refnamediv> 17 <refnamediv>
4 <refname>horner</refname> 18 <refname>horner</refname>
5 <refpurpose>évaluation d'un polynôme ou d'une fraction rationnelle </refpurpose> 19 <refpurpose>évalue des polynômes ou des fractions rationnelles en des valeurs données</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
@@ -12,16 +26,16 @@
12 <title>Paramètres</title> 26 <title>Paramètres</title>
13 <variablelist> 27 <variablelist>
14 <varlistentry> 28 <varlistentry>
15 <term>P </term> 29 <term>P</term>
16 <listitem> 30 <listitem>
17 <para>polynôme ou matrice de polynômes 31 <para>tableau de polynômes ou de quotients polynomiaux (fractions rationnelles).
18 </para> 32 </para>
19 </listitem> 33 </listitem>
20 </varlistentry> 34 </varlistentry>
21 <varlistentry> 35 <varlistentry>
22 <term>x </term> 36 <term>x</term>
23 <listitem> 37 <listitem>
24 <para>vecteur de nombres , de polynômes ou de fractions rationnelles 38 <para>tableau de nombres, de polynômes, ou de fractions rationnelles.
25 </para> 39 </para>
26 </listitem> 40 </listitem>
27 </varlistentry> 41 </varlistentry>
@@ -48,33 +62,101 @@
48 </refsection> 62 </refsection>
49 <refsection> 63 <refsection>
50 <title>Exemples</title> 64 <title>Exemples</title>
65 <para>
66 Evaluations d'un polynôme :
67 </para>
68 <programlisting role="example"><![CDATA[
69P = poly(1:3, 'x', 'coeff')
70s = %s;
71horner(P, [1 2 ; 3 4]) // pour des valeurs réelles
72horner(P, [1 2 ; 3 4]+%i) // pour des valeurs complexes
73horner(P, [1, s ; s^2, s^3]) // pour d'autres polynômes
74horner(P, [1/s, 1/s^2]) // pour des fractions rationnelles
75 ]]></programlisting>
76 <screen><![CDATA[
77--> P = poly(1:3, 'x', 'coeff')
78 P =
79 1 +2x +3x²
80
81--> s = %s;
82--> horner(P, [1 2 ; 3 4]) // pour des valeurs réelles
83 ans =
84 6. 17.
85 34. 57.
86
87--> horner(P, [1 2 ; 3 4]+%i) // pour des valeurs complexes
88 ans =
89 3. + 8.i 14. + 14.i
90 31. + 20.i 54. + 26.i
91
92--> horner(P, [1, s ; s^2, s^3]) // pour d'autres polynômes
93 ans =
94 6 1 +2s +3s²
95
96 1 +2s² +3s⁴ 1 +2s³ +3s⁶
97
98--> horner(P, [1/s, 1/s^2]) // pour des fractions rationnelles
99 ans =
100 3 +2s +s² 3 +2s² +s⁴
101 --------- ----------
102 s² s⁴
103]]></screen>
104 <para/>
105 <para>
106 Evaluation of de fractions rationnelles :
107 </para>
51 <programlisting role="example"><![CDATA[ 108 <programlisting role="example"><![CDATA[
52//evaluation d'un polynŽôme pour un vecteur de nombres 109[s,z] = (%s, %z);
53P=poly(1:3,'x') 110M = [1/s, (s-1)/s]
54horner(P,[1 2 5]) 111horner(M, 1)
55horner(P,[1 2 5]+%i) 112horner(M, %i)
113horner(M, 2+s)
114horner(M, (2+z)/z)
115horner(M, [1, 1/z ; 2, (2+z)/z])
116 ]]></programlisting>
117 <screen><![CDATA[
118--> M = [1/s, (s-1)/s]
119 M =
120 1 -1 +s
121 - -----
122 s s
123
124--> horner(M, 1)
125 ans =
126 1. 0.
127
128--> horner(M, %i)
129 ans =
130 0. - i 1. + i
56 131
57//evaluation d'un vecteur de fractions rationnelles 132--> horner(M, 2+s)
58s=poly(0,'s');M=[s,1/s]; 133 ans =
59horner(M,1) 134 1 1 +s
60horner(M,%i) 135 ---- ----
61horner(M,1/s) 136 2 +s 2 +s
62 137
63//evaluation d'un polynŽôme pour une matrice de nombres 138--> horner(M, (2+z)/z)
64X= [1 2;3 4] 139 ans =
65p=poly(1:3,'x','c') 140 z 2
66m=horner(p, X) 141 ---- ----
671*X.^0+2*X.^1+3*X.^2 142 2 +z 2 +z
68 ]]></programlisting> 143
144--> horner(M, [1, 1/z ; 2, (2+z)/z])
145 ans =
146 1 z 0 1 -z
147 - - - ----
148 1 1 1 1
149
150 1 z 1 2
151 - ---- - ----
152 2 2 +z 2 2 +z
153]]></screen>
69 </refsection> 154 </refsection>
70 <refsection role="see also"> 155 <refsection role="see also">
71 <title>Voir aussi</title> 156 <title>Voir aussi</title>
72 <simplelist type="inline"> 157 <simplelist type="inline">
73 <member> 158 <member>
74 <link linkend="freq">freq</link> 159 <link linkend="feval">feval</link>
75 </member>
76 <member>
77 <link linkend="repfreq">repfreq</link>
78 </member> 160 </member>
79 <member> 161 <member>
80 <link linkend="evstr">evstr</link> 162 <link linkend="evstr">evstr</link>
diff --git a/scilab/modules/polynomials/help/fr_FR/hrmt.xml b/scilab/modules/polynomials/help/fr_FR/hrmt.xml
index b962366..bf21d35 100644
--- a/scilab/modules/polynomials/help/fr_FR/hrmt.xml
+++ b/scilab/modules/polynomials/help/fr_FR/hrmt.xml
@@ -6,7 +6,7 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[pg,U]=hrmt(v)</synopsis> 9 <synopsis>[pg, U] = hrmt(v)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
@@ -28,7 +28,7 @@
28 <varlistentry> 28 <varlistentry>
29 <term>U </term> 29 <term>U </term>
30 <listitem> 30 <listitem>
31 <para>matrice unimodulaire de polynômes 31 <para>matrice unimodulaire de polynômes.
32 </para> 32 </para>
33 </listitem> 33 </listitem>
34 </varlistentry> 34 </varlistentry>
@@ -44,11 +44,29 @@
44 <refsection> 44 <refsection>
45 <title>Exemples</title> 45 <title>Exemples</title>
46 <programlisting role="example"><![CDATA[ 46 <programlisting role="example"><![CDATA[
47x=poly(0,'x'); 47x = poly(0,'x');
48v=[x*(x+1),x^2*(x+1),(x-2)*(x+1),(3*x^2+2)*(x+1)]; 48v = [x*(x+1), x^2*(x+1), (x-2)*(x+1), (3*x^2+2)*(x+1)]
49[pg,U]=hrmt(v);U=clean(U) 49[pg, U] = hrmt(v);
50U = clean(U)
50det(U) 51det(U)
51 ]]></programlisting> 52 ]]></programlisting>
53 <screen><![CDATA[
54--> v = [x*(x+1), x^2*(x+1), (x-2)*(x+1), (3*x^2+2)*(x+1)]
55 v =
56 x +x² x² +x³ -2 -x +x² 2 +2x +3x² +3x³
57
58--> [pg, U] = hrmt(v);
59--> U = clean(U)
60 U =
61 x -2 +x 1 +1.5x² 0.5
62 -1 0 0 0
63 0 -x -1 -1.5x² -0.5
64 0 0 -1 0
65
66--> det(U)
67 ans =
68 1
69]]></screen>
52 </refsection> 70 </refsection>
53 <refsection role="see also"> 71 <refsection role="see also">
54 <title>Voir aussi</title> 72 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/htrianr.xml b/scilab/modules/polynomials/help/fr_FR/htrianr.xml
index 198d583..d3ea6b8 100644
--- a/scilab/modules/polynomials/help/fr_FR/htrianr.xml
+++ b/scilab/modules/polynomials/help/fr_FR/htrianr.xml
@@ -6,7 +6,7 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[Ar,U,rk]=htrianr(A)</synopsis> 9 <synopsis>[Ar, U, rk] = htrianr(A)</synopsis>
10 </refsynopsisdiv> 10 </refsynopsisdiv>
11 <refsection> 11 <refsection>
12 <title>Paramètres</title> 12 <title>Paramètres</title>
@@ -28,7 +28,7 @@
28 <varlistentry> 28 <varlistentry>
29 <term>U </term> 29 <term>U </term>
30 <listitem> 30 <listitem>
31 <para>matrice unimodulaire de polynômes 31 <para>matrice unimodulaire de polynômes.
32 </para> 32 </para>
33 </listitem> 33 </listitem>
34 </varlistentry> 34 </varlistentry>
@@ -48,7 +48,7 @@
48 triangularisation de la matrice de polynômes <literal>A</literal>. 48 triangularisation de la matrice de polynômes <literal>A</literal>.
49 </para> 49 </para>
50 <para> 50 <para>
51 <literal>A</literal> de taille <literal>[m,n]</literal>, <literal>m &lt;= n</literal>. 51 <literal>A</literal> de taille <literal>[m,n]</literal>, <literal>m n</literal>.
52 </para> 52 </para>
53 <para> 53 <para>
54 <literal>Ar=A*U</literal> 54 <literal>Ar=A*U</literal>
@@ -62,12 +62,12 @@
62 <refsection> 62 <refsection>
63 <title>Exemples</title> 63 <title>Exemples</title>
64 <programlisting role="example"><![CDATA[ 64 <programlisting role="example"><![CDATA[
65x=poly(0,'x'); 65x = poly(0,'x');
66M=[x;x^2;2+x^3]*[1,x-2,x^4]; 66M = [x ; x^2 ; 2+x^3]*[1, x-2, x^4];
67[Mu,U,rk]=htrianr(M) 67[Mu, U, rk] = htrianr(M)
68det(U) 68det(U)
69M*U(:,1:2) 69M*U(:,1:2)
70 ]]></programlisting> 70 ]]></programlisting>
71 </refsection> 71 </refsection>
72 <refsection role="see also"> 72 <refsection role="see also">
73 <title>Voir aussi</title> 73 <title>Voir aussi</title>
diff --git a/scilab/modules/polynomials/help/fr_FR/inv_coeff.xml b/scilab/modules/polynomials/help/fr_FR/inv_coeff.xml
index f0e9d18..7790beb 100644
--- a/scilab/modules/polynomials/help/fr_FR/inv_coeff.xml
+++ b/scilab/modules/polynomials/help/fr_FR/inv_coeff.xml
@@ -6,7 +6,11 @@
6 </refnamediv> 6 </refnamediv>
7 <refsynopsisdiv> 7 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 8 <title>Séquence d'appel</title>
9 <synopsis>[P]=inv_coeff(C,[,d,[name])</synopsis> 9 <synopsis>
10 P = inv_coeff(C)
11 P = inv_coeff(C, d)
12 P = inv_coeff(C, d, varname)
13 </synopsis>
10 </refsynopsisdiv> 14 </refsynopsisdiv>
11 <refsection> 15 <refsection>
12 <title>Paramètres</title> 16 <title>Paramètres</title>
@@ -27,10 +31,10 @@
27 </listitem> 31 </listitem>
28 </varlistentry> 32 </varlistentry>
29 <varlistentry> 33 <varlistentry>
30 <term>name </term> 34 <term>varname </term>
31 <listitem> 35 <listitem>
32 <para> 36 <para>
33 chaîne de caractères (indétermie du polynôme, <literal>'x'</literal> par défaut). 37 Nom de la variable du polynôme, <literal>'x'</literal> par défaut.
34 </para> 38 </para>
35 </listitem> 39 </listitem>
36 </varlistentry> 40 </varlistentry>
@@ -46,12 +50,13 @@
46 <refsection> 50 <refsection>
47 <title>Exemples</title> 51 <title>Exemples</title>
48 <programlisting role="example"><![CDATA[ 52 <programlisting role="example"><![CDATA[
49A=int(10*rand(2,6)) 53A = int(10*rand(2,6))
50// construction d'une matrice polynomiale de degré 1 54// construction d'une matrice polynomiale de degré 1
51P=inv_coeff(A,1) 55P = inv_coeff(A, 1)
52norm(coeff(P)-A) 56norm(coeff(P)-A)
57
53// utilisation de la valeur par défaut du degré 58// utilisation de la valeur par défaut du degré
54P1=inv_coeff(A) 59P1 = inv_coeff(A)
55norm(coeff(P1)-A) 60norm(coeff(P1)-A)
56 ]]></programlisting> 61 ]]></programlisting>
57 </refsection> 62 </refsection>
diff --git a/scilab/modules/polynomials/help/fr_FR/invr.xml b/scilab/modules/polynomials/help/fr_FR/invr.xml
index 84291f5..61fc453 100644
--- a/scilab/modules/polynomials/help/fr_FR/invr.xml
+++ b/scilab/modules/polynomials/help/fr_FR/invr.xml
@@ -1,8 +1,22 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="invr"> 16<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="fr" xml:id="invr">
3 <refnamediv> 17 <refnamediv>
4 <refname>invr</refname> 18 <refname>invr</refname>
5 <refpurpose>inversion d'une matrice rationnelle (ou polynomiale) </refpurpose> 19 <refpurpose>inverse une matrice de polynômes ou de fractions rationelles</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
@@ -12,17 +26,15 @@
12 <title>Paramètres</title> 26 <title>Paramètres</title>
13 <variablelist> 27 <variablelist>
14 <varlistentry> 28 <varlistentry>
15 <term>H </term> 29 <term>H</term>
16 <listitem> 30 <listitem>
17 <para>polynôme ou matrice de polynômes 31 matrice de polynômes ou de quotients polynomiaux (fractions rationelles).
18 </para>
19 </listitem> 32 </listitem>
20 </varlistentry> 33 </varlistentry>
21 <varlistentry> 34 <varlistentry>
22 <term>F </term> 35 <term>F </term>
23 <listitem> 36 <listitem>
24 <para>polynôme ou matrice de polynômes 37 matrice de fractions rationelles
25 </para>
26 </listitem> 38 </listitem>
27 </varlistentry> 39 </varlistentry>
28 </variablelist> 40 </variablelist>
@@ -30,30 +42,65 @@
30 <refsection> 42 <refsection>
31 <title>Description</title> 43 <title>Description</title>
32 <para> 44 <para>
33 Si <literal>H</literal> est une matrice de polynômes ou de fractions rationnelles, <literal>invr</literal> 45 <literal>invr</literal> calcule <literal>H<superscript>-1</superscript></literal>
34 calcule <literal>H^(-1)</literal> avec l'algorithme de Leverrier (voir code de la fonction). 46 selon l'algorithme de Leverrier (voir code de la fonction).
35 </para> 47 </para>
36 </refsection> 48 </refsection>
37 <refsection> 49 <refsection>
38 <title>Exemples</title> 50 <title>Exemples</title>
39 <programlisting role="example"><![CDATA[ 51 <programlisting role="example"><![CDATA[
40s=poly(0,'s') 52s = %s;
41H=[s,s*s+2;1-s,1+s]; invr(H) 53H = [s, s*s+2 ; 1-s, 1+s], iH = invr(H), H * iH
42[Num,den]=coffg(H);Num/den 54
43H=[1/s,(s+1);1/(s+2),(s+3)/s];invr(H) 55[Num,den] = coffg(H); Num/den
44 ]]></programlisting> 56H = [1/s, (s+1) ; 1/(s+2), (s+3)/s]; invr(H)
57 ]]></programlisting>
58 <screen><![CDATA[
59--> H = [s, s*s+2 ; 1-s, 1+s], iH = invr(H), H * iH
60 H =
61 s 2 +s²
62 1 -s 1 +s
63
64 iH =
65 1 +s -2 -s²
66 ---------- ----------
67 -2 +3s +s³ -2 +3s +s³
68
69 -1 +s s
70 ---------- ----------
71 -2 +3s +s³ -2 +3s +s³
72
73 ans =
74 1 0
75 - -
76 1 1
77
78 0 1
79 - -
80 1 1
81
82--> [Num,den] = coffg(H); Num/den
83 ans =
84 1 +s -2 -s²
85 ---------- ----------
86 -2 +3s +s³ -2 +3s +s³
87
88 -1 +s s
89 ---------- ----------
90 -2 +3s +s³ -2 +3s +s³
91]]></screen>
45 </refsection> 92 </refsection>
46 <refsection role="see also"> 93 <refsection role="see also">
47 <title>Voir aussi</title> 94 <title>Voir aussi</title>
48 <simplelist type="inline"> 95 <simplelist type="inline">
49 <member> 96 <member>
50 <link linkend="glever">glever</link> 97 <link linkend="inv">inv</link>
51 </member> 98 </member>
52 <member> 99 <member>
53 <link linkend="coffg">coffg</link> 100 <link linkend="glever">glever</link>
54 </member> 101 </member>
55 <member> 102 <member>
56 <link linkend="inv">inv</link> 103 <link linkend="coffg">coffg</link>
57 </member> 104 </member>
58 </simplelist> 105 </simplelist>
59 </refsection> 106 </refsection>
diff --git a/scilab/modules/polynomials/help/fr_FR/pol2str.xml b/scilab/modules/polynomials/help/fr_FR/pol2str.xml
index e15e48f..55b8e59 100644
--- a/scilab/modules/polynomials/help/fr_FR/pol2str.xml
+++ b/scilab/modules/polynomials/help/fr_FR/pol2str.xml
@@ -21,7 +21,7 @@
21 </refnamediv> 21 </refnamediv>
22 <refsynopsisdiv> 22 <refsynopsisdiv>
23 <title>Séquence d'appel</title> 23 <title>Séquence d'appel</title>
24 <synopsis>strs = pol2str(p)</synopsis> 24 <synopsis>strP = pol2str(P)</synopsis>
25 </refsynopsisdiv> 25 </refsynopsisdiv>
26 <refsection> 26 <refsection>
27 <title>Paramètres</title> 27 <title>Paramètres</title>
@@ -29,14 +29,14 @@
29 <varlistentry> 29 <varlistentry>
30 <term>p </term> 30 <term>p </term>
31 <listitem> 31 <listitem>
32 <para>matrice ou hypermatrice de polynômes à coefficients réels ou complexes 32 <para>Tableau de polynômes à coefficients réels ou complexes.
33 </para> 33 </para>
34 </listitem> 34 </listitem>
35 </varlistentry> 35 </varlistentry>
36 <varlistentry> 36 <varlistentry>
37 <term>str </term> 37 <term>strP </term>
38 <listitem> 38 <listitem>
39 <para>matrice ou hypermatrice texte 39 <para>Tableau de textes, de taille égale à <literal>size(P)</literal>.
40 </para> 40 </para>
41 </listitem> 41 </listitem>
42 </varlistentry> 42 </varlistentry>
@@ -45,7 +45,7 @@
45 <refsection> 45 <refsection>
46 <title>Description</title> 46 <title>Description</title>
47 <para> 47 <para>
48 convertit les polynômes p en textes les représentant (fonction utilitaire). 48 convertit les polynômes P en textes les représentant (fonction utilitaire).
49 </para> 49 </para>
50 <para> 50 <para>
51 <note> 51 <note>
@@ -86,7 +86,10 @@ pol2str(p)
86 <revhistory> 86 <revhistory>
87 <revision> 87 <revision>
88 <revnumber>5.5.0</revnumber> 88 <revnumber>5.5.0</revnumber>
89 <revdescription>Extension aux polynômes à coefficients complexes et aux hypermatrices. Vectorisation du traitement du tableau de polynômes</revdescription> 89 <revdescription>
90 Extension aux polynômes à coefficients complexes et aux hypermatrices.
91 Vectorisation du traitement du tableau de polynômes.
92 </revdescription>
90 </revision> 93 </revision>
91 </revhistory> 94 </revhistory>
92 </refsection> 95 </refsection>
diff --git a/scilab/modules/polynomials/help/fr_FR/polfact.xml b/scilab/modules/polynomials/help/fr_FR/polfact.xml
index 4c43c89..a0f6baa 100644
--- a/scilab/modules/polynomials/help/fr_FR/polfact.xml
+++ b/scilab/modules/polynomials/help/fr_FR/polfact.xml
@@ -1,12 +1,26 @@
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA - Serge STEER
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
6 * Copyright (C) 2021 - Samuel GOUGEON
7 *
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
14 *
15 -->
2<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="fr" xml:id="polfact"> 16<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="fr" xml:id="polfact">
3 <refnamediv> 17 <refnamediv>
4 <refname>polfact</refname> 18 <refname>polfact</refname>
5 <refpurpose>facteurs minimaux </refpurpose> 19 <refpurpose>facteurs réels minimaux d'un polynôme</refpurpose>
6 </refnamediv> 20 </refnamediv>
7 <refsynopsisdiv> 21 <refsynopsisdiv>
8 <title>Séquence d'appel</title> 22 <title>Séquence d'appel</title>
9 <synopsis>[f]=polfact(p)</synopsis> 23 <synopsis>f = polfact(p)</synopsis>
10 </refsynopsisdiv> 24 </refsynopsisdiv>
11 <refsection> 25 <refsection>
12 <title>Paramètres</title> 26 <title>Paramètres</title>
@@ -15,7 +29,7 @@
15 <term>p </term> 29 <term>p </term>
16 <listitem> 30 <listitem>
17 <para> 31 <para>
18 polynôme 32 polynôme à coefficients réels.
19 </para> 33 </para>
20 </listitem> 34 </listitem>
21 </varlistentry> 35 </varlistentry>
@@ -23,62 +37,87 @@
23 <term>f </term> 37 <term>f </term>
24 <listitem> 38 <listitem>
25 <para> 39 <para>
26 vecteur <literal>[f0 f1 ... fn]</literal> tel que <literal>p=prod(f)</literal> 40 vecteur ligne de polynômes <literal>[f0 f1 ... fn]</literal> à coefficients
41 réels, tel que <literal>p=prod(f)</literal>.
42 <literal>f0=f(1)</literal> est un polynôme constant. <literal>f(2:$)</literal>
43 sont tous de degré 1 ou 2.
27 </para> 44 </para>
28 <variablelist> 45 <warning>
29 <varlistentry> 46 Les coefficients des polynômes <varname>f</varname> sont calculés avec une
30 <term>f0 </term> 47 incertitude relative de
31 <listitem> 48 <literal>%eps</literal><superscript>1/degree(p)</superscript>.
32 <para> 49 </warning>
33 constante
34 </para>
35 </listitem>
36 </varlistentry>
37 <varlistentry>
38 <term>fi </term>
39 <listitem>
40 <para>
41 polynôme
42 </para> </