summaryrefslogtreecommitdiffstats
path: root/scilab/modules/compatibility_functions
diff options
context:
space:
mode:
authorYann Collette <yann.collette@scilab.org>2009-07-27 15:59:19 +0200
committerYann Collette <yann.collette@scilab.org>2009-07-27 15:59:19 +0200
commitf13b606e08b0905844d4215f7c2a54747d96c000 (patch)
treea2257ab417c64e49da03335a97b09b1b80aa974b /scilab/modules/compatibility_functions
parentafef299c6df0294a3af906b5c11cad9bb8e72d41 (diff)
downloadscilab-f13b606e08b0905844d4215f7c2a54747d96c000.zip
scilab-f13b606e08b0905844d4215f7c2a54747d96c000.tar.gz
correct bug 4184 for compatibility_functions - uniformisation of the examples presentation
Diffstat (limited to 'scilab/modules/compatibility_functions')
-rw-r--r--scilab/modules/compatibility_functions/help/en_US/firstnonsingleton.xml45
-rw-r--r--scilab/modules/compatibility_functions/help/en_US/makecell.xml64
-rw-r--r--scilab/modules/compatibility_functions/help/en_US/mtlb_eval.xml113
-rw-r--r--scilab/modules/compatibility_functions/help/en_US/mtlb_var.xml113
-rw-r--r--scilab/modules/compatibility_functions/help/fr_FR/firstnonsingleton.xml49
5 files changed, 245 insertions, 139 deletions
diff --git a/scilab/modules/compatibility_functions/help/en_US/firstnonsingleton.xml b/scilab/modules/compatibility_functions/help/en_US/firstnonsingleton.xml
index 144d5b1..6252a0d 100644
--- a/scilab/modules/compatibility_functions/help/en_US/firstnonsingleton.xml
+++ b/scilab/modules/compatibility_functions/help/en_US/firstnonsingleton.xml
@@ -10,48 +10,70 @@
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 * 11 *
12 --> 12 -->
13<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" version="5.0-subset Scilab" xml:lang="en" xml:id="firstnonsingleton"> 13<refentry version="5.0-subset Scilab" xml:id="firstnonsingleton" xml:lang="en"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns4="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
14 <info> 20 <info>
15 <pubdate>$LastChangedDate$</pubdate> 21 <pubdate>$LastChangedDate$</pubdate>
16 </info> 22 </info>
23
17 <refnamediv> 24 <refnamediv>
18 <refname>firstnonsingleton</refname> 25 <refname>firstnonsingleton</refname>
26
19 <refpurpose>Finds first dimension which is not 1</refpurpose> 27 <refpurpose>Finds first dimension which is not 1</refpurpose>
20 </refnamediv> 28 </refnamediv>
29
21 <refsynopsisdiv> 30 <refsynopsisdiv>
22 <title>Calling Sequence</title> 31 <title>Calling Sequence</title>
32
23 <synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis> 33 <synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis>
24 </refsynopsisdiv> 34 </refsynopsisdiv>
35
25 <refsection> 36 <refsection>
26 <title>Parameters</title> 37 <title>Parameters</title>
38
27 <variablelist> 39 <variablelist>
28 <varlistentry> 40 <varlistentry>
29 <term>dim</term> 41 <term>dim</term>
42
30 <listitem> 43 <listitem>
31 <para>first dimension of A which is not 1</para> 44 <para>first dimension of A which is not 1</para>
32 </listitem> 45 </listitem>
33 </varlistentry> 46 </varlistentry>
47
34 <varlistentry> 48 <varlistentry>
35 <term>A</term> 49 <term>A</term>
50
36 <listitem> 51 <listitem>
37 <para>a variable of any Scilab data type</para> 52 <para>a variable of any Scilab data type</para>
38 </listitem> 53 </listitem>
39 </varlistentry> 54 </varlistentry>
55
40 <varlistentry> 56 <varlistentry>
41 <term>opt</term> 57 <term>opt</term>
58
42 <listitem> 59 <listitem>
43 <para>a character string giving the type of output we want</para> 60 <para>a character string giving the type of output we want</para>
61
44 <variablelist> 62 <variablelist>
45 <varlistentry> 63 <varlistentry>
46 <term>"num"</term> 64 <term>"num"</term>
65
47 <listitem> 66 <listitem>
48 <para>returned value is a numerical value</para> 67 <para>returned value is a numerical value</para>
49 </listitem> 68 </listitem>
50 </varlistentry> 69 </varlistentry>
70
51 <varlistentry> 71 <varlistentry>
52 <term>"str"</term> 72 <term>"str"</term>
73
53 <listitem> 74 <listitem>
54 <para>returned value is a character string if possible ("r" instead of 1 and "c" instead of 2)</para> 75 <para>returned value is a character string if possible ("r"
76 instead of 1 and "c" instead of 2)</para>
55 </listitem> 77 </listitem>
56 </varlistentry> 78 </varlistentry>
57 </variablelist> 79 </variablelist>
@@ -59,28 +81,31 @@
59 </varlistentry> 81 </varlistentry>
60 </variablelist> 82 </variablelist>
61 </refsection> 83 </refsection>
84
62 <refsection> 85 <refsection>
63 <title>Description</title> 86 <title>Description</title>
64 <para> 87
65 This function is used by <literal>mfile2sci</literal> to emulate Matlab behavior under Scilab, particularly 88 <para>This function is used by <literal>mfile2sci</literal> to emulate
66 for functions which treat the values along the first non-singleton dimension of A in Matlab 89 Matlab behavior under Scilab, particularly for functions which treat the
67 while in Scilab they treat all values of A. 90 values along the first non-singleton dimension of A in Matlab while in
68 </para> 91 Scilab they treat all values of A.</para>
69 </refsection> 92 </refsection>
93
70 <refsection> 94 <refsection>
71 <title>Examples</title> 95 <title>Examples</title>
72 <programlisting role="example"><![CDATA[
73 96
97 <programlisting role="example">
74A = [1 2 3;4 5 6]; 98A = [1 2 3;4 5 6];
75// Scilab max 99// Scilab max
76M = max(A) 100M = max(A)
77// Matlab max emulation 101// Matlab max emulation
78M = max(A,firstnonsingleton(A)) 102M = max(A,firstnonsingleton(A))
79 103 </programlisting>
80 ]]></programlisting>
81 </refsection> 104 </refsection>
105
82 <refsection> 106 <refsection>
83 <title>Authors</title> 107 <title>Authors</title>
108
84 <simplelist type="vert"> 109 <simplelist type="vert">
85 <member>V.C.</member> 110 <member>V.C.</member>
86 </simplelist> 111 </simplelist>
diff --git a/scilab/modules/compatibility_functions/help/en_US/makecell.xml b/scilab/modules/compatibility_functions/help/en_US/makecell.xml
index 6276ef2..e8391b4 100644
--- a/scilab/modules/compatibility_functions/help/en_US/makecell.xml
+++ b/scilab/modules/compatibility_functions/help/en_US/makecell.xml
@@ -10,75 +10,91 @@
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 * 11 *
12--> 12-->
13<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" version="5.0-subset Scilab" xml:lang="fr" xml:id="makecell"> 13<refentry version="5.0-subset Scilab" xml:id="makecell" xml:lang="fr"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns4="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
14 <info> 20 <info>
15 <pubdate>$LastChangedDate: 18-04-2008 $</pubdate> 21 <pubdate>$LastChangedDate: 18-04-2008 $</pubdate>
16 </info> 22 </info>
23
17 <refnamediv> 24 <refnamediv>
18 <refname>makecell</refname> 25 <refname>makecell</refname>
19 <refpurpose>Creates a cell array. </refpurpose> 26
27 <refpurpose>Creates a cell array.</refpurpose>
20 </refnamediv> 28 </refnamediv>
29
21 <refsynopsisdiv> 30 <refsynopsisdiv>
22 <title>Calling Sequence</title> 31 <title>Calling Sequence</title>
32
23 <synopsis>s = makecell(dims,a1,a2,...an)</synopsis> 33 <synopsis>s = makecell(dims,a1,a2,...an)</synopsis>
24 </refsynopsisdiv> 34 </refsynopsisdiv>
35
25 <refsection> 36 <refsection>
26 <title>Parameters</title> 37 <title>Parameters</title>
38
27 <variablelist> 39 <variablelist>
28 <varlistentry> 40 <varlistentry>
29 <term>dims</term> 41 <term>dims</term>
42
30 <listitem> 43 <listitem>
31 <para> 44 <para>a vector with positive integer elements, the cell array
32 a vector with positive integer elements, the cell array dimension 45 dimension</para>
33 </para>
34 </listitem> 46 </listitem>
35 </varlistentry> 47 </varlistentry>
48
36 <varlistentry> 49 <varlistentry>
37 <term>a1,a2,...,an</term> 50 <term>a1,a2,...,an</term>
51
38 <listitem> 52 <listitem>
39 <para> 53 <para>Sequence of Scilab variables, <literal>n</literal> must be
40 Sequence of Scilab variables, <literal>n</literal> must be equal to <literal>prod(dims)</literal> 54 equal to <literal>prod(dims)</literal></para>
41 </para>
42 </listitem> 55 </listitem>
43 </varlistentry> 56 </varlistentry>
57
44 <varlistentry> 58 <varlistentry>
45 <term>s</term> 59 <term>s</term>
60
46 <listitem> 61 <listitem>
47 <para> 62 <para>resulting cell array</para>
48 resulting cell array
49 </para>
50 </listitem> 63 </listitem>
51 </varlistentry> 64 </varlistentry>
52 </variablelist> 65 </variablelist>
53 </refsection> 66 </refsection>
67
54 <refsection> 68 <refsection>
55 <title>Description</title> 69 <title>Description</title>
56 <para> 70
57 <literal>s = makecell(dims,a1,a2,...an)</literal> creates a cell 71 <para><literal>s = makecell(dims,a1,a2,...an)</literal> creates a cell
58 array of dimensions given by <literal>dims</literal> with the 72 array of dimensions given by <literal>dims</literal> with the given input
59 given input arguments. The <literal>ai</literal> are stored 73 arguments. The <literal>ai</literal> are stored along the last dimension
60 along the last dimension first. 74 first.</para>
61 </para>
62 </refsection> 75 </refsection>
76
63 <refsection> 77 <refsection>
64 <title>Examples</title> 78 <title>Examples</title>
65 <programlisting role="example"><![CDATA[ 79
66 makecell([2,3],1,2,3,'x','y','z') 80 <programlisting role="example">
67 ]]></programlisting> 81makecell([2,3],1,2,3,'x','y','z')
82 </programlisting>
68 </refsection> 83 </refsection>
84
69 <refsection> 85 <refsection>
70 <title>See Also</title> 86 <title>See Also</title>
87
71 <simplelist type="inline"> 88 <simplelist type="inline">
72 <member> 89 <member><link linkend="cell">cell</link></member>
73 <link linkend="cell" >cell</link>
74 </member>
75 </simplelist> 90 </simplelist>
76 </refsection> 91 </refsection>
92
77 <refsection> 93 <refsection>
78 <title>Authors</title> 94 <title>Authors</title>
95
79 <simplelist type="vert"> 96 <simplelist type="vert">
80 <member>Farid Belhacen, INRIA</member> 97 <member>Farid Belhacen, INRIA</member>
81 </simplelist> 98 </simplelist>
82 </refsection> 99 </refsection>
83
84</refentry> 100</refentry>
diff --git a/scilab/modules/compatibility_functions/help/en_US/mtlb_eval.xml b/scilab/modules/compatibility_functions/help/en_US/mtlb_eval.xml
index 321c433..2e2623c 100644
--- a/scilab/modules/compatibility_functions/help/en_US/mtlb_eval.xml
+++ b/scilab/modules/compatibility_functions/help/en_US/mtlb_eval.xml
@@ -10,87 +10,100 @@
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 * 11 *
12 --> 12 -->
13<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" version="5.0-subset Scilab" xml:lang="en" xml:id="mtlb_eval"> 13<refentry version="5.0-subset Scilab" xml:id="mtlb_eval" xml:lang="en"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns4="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
14 <info> 20 <info>
15 <pubdate>$LastChangedDate$</pubdate> 21 <pubdate>$LastChangedDate$</pubdate>
16 </info> 22 </info>
23
17 <refnamediv> 24 <refnamediv>
18 <refname>mtlb_eval</refname> 25 <refname>mtlb_eval</refname>
26
19 <refpurpose>Matlab eval emulation function</refpurpose> 27 <refpurpose>Matlab eval emulation function</refpurpose>
20 </refnamediv> 28 </refnamediv>
29
21 <refsection> 30 <refsection>
22 <title>Description</title> 31 <title>Description</title>
23 <para>Scilab equivalent for Matlab <literal>eval</literal> is different according to its inputs and outputs</para> 32
24 <para> 33 <para>Scilab equivalent for Matlab <literal>eval</literal> is different
25 The function <literal>mtlb_eval(str1,str2)</literal> is used by 34 according to its inputs and outputs</para>
26 <literal>mfile2sci</literal> to replace <literal>eval</literal> because it was not possible to know 35
27 what were the inputs while porting Matlab code to Scilab. This function will 36 <para>The function <literal>mtlb_eval(str1,str2)</literal> is used by
28 determine the correct semantic at run time. If you want to have a 37 <literal>mfile2sci</literal> to replace <literal>eval</literal> because it
29 more efficient code it is possible to replace <literal>mtlb_eval</literal> calls: 38 was not possible to know what were the inputs while porting Matlab code to
30 </para> 39 Scilab. This function will determine the correct semantic at run time. If
40 you want to have a more efficient code it is possible to replace
41 <literal>mtlb_eval</literal> calls:</para>
42
31 <itemizedlist> 43 <itemizedlist>
32 <listitem> 44 <listitem>
33 <para> 45 <para>When called with one input and no output,
34 When called with one input and no output, 46 <literal>mtlb_eval(str1)</literal> may be replaced by
35 <literal>mtlb_eval(str1)</literal> may be replaced by <literal>evstr(str1)</literal> 47 <literal>evstr(str1)</literal> if <literal>str1</literal> is a valid
36 if <literal>str1</literal> is a valid Scilab expression 48 Scilab expression or by <literal>execstr(str1)</literal> if
37 or by <literal>execstr(str1)</literal> 49 <literal>str1</literal> is a valid Scilab instruction.</para>
38 if <literal>str1</literal> is a valid Scilab instruction.
39 </para>
40 </listitem> 50 </listitem>
51
41 <listitem> 52 <listitem>
42 <para> 53 <para>When called with one input and one output,
43 When called with one input and one output, 54 <literal>val=mtlb_eval(str1)</literal> may be replaced by
44 <literal>val=mtlb_eval(str1)</literal> may be replaced by <literal>val=evstr(str1)</literal> 55 <literal>val=evstr(str1)</literal> if <literal>str1</literal> is a
45 if <literal>str1</literal> is a valid Scilab instruction. 56 valid Scilab instruction.</para>
46 </para>
47 </listitem> 57 </listitem>
58
48 <listitem> 59 <listitem>
49 <para> 60 <para>When called with two inputs and no output,
50 When called with two inputs and no output,
51 <literal>mtlb_eval(str1,str2)</literal> may be replaced by: 61 <literal>mtlb_eval(str1,str2)</literal> may be replaced by:
52 <literal>if execstr(str1,"errcatch")&lt;&gt;0 then execstr(str2);end</literal> 62 <literal>if execstr(str1,"errcatch")&lt;&gt;0 then
53 if <literal>str1</literal> and <literal>str2</literal> are valid Scilab instructions. 63 execstr(str2);end</literal> if <literal>str1</literal> and
54 </para> 64 <literal>str2</literal> are valid Scilab instructions.</para>
55 </listitem> 65 </listitem>
66
56 <listitem> 67 <listitem>
57 <para> 68 <para>When called with more than one output and one input,
58 When called with more than one output and one input,
59 <literal>[val1,val2,...]=mtlb_eval(str1)</literal> may be replaced by 69 <literal>[val1,val2,...]=mtlb_eval(str1)</literal> may be replaced by
60 <literal>execstr("[val1,val2,...]"+str1)</literal> 70 <literal>execstr("[val1,val2,...]"+str1)</literal> if
61 if <literal>str1</literal> is a valid Scilab instruction. 71 <literal>str1</literal> is a valid Scilab instruction.</para>
62 </para>
63 </listitem> 72 </listitem>
73
64 <listitem> 74 <listitem>
65 <para> 75 <para>When called with two inputs and more than one output,
66 When called with two inputs and more than one output, 76 <literal>[val1,val2,...]=mtlb_eval(str1,str2)</literal> may be
67 <literal>[val1,val2,...]=mtlb_eval(str1,str2)</literal> may be replaced by: 77 replaced by:</para>
68 </para> 78
69 <programlisting><![CDATA[ 79 <programlisting>
70 if execstr("[val1,val2,...]"+str1,"errcatch")<>0 then 80if execstr("[val1,val2,...]"+str1,"errcatch")&lt;&gt;0 then
71 execstr("[val1,val2,...]"+str2); 81 execstr("[val1,val2,...]"+str2);
72 end 82end
73 ]]></programlisting> 83 </programlisting>
74 <para> 84
75 if <literal>str1</literal> and <literal>str2</literal> are valid Scilab instructions. 85 <para>if <literal>str1</literal> and <literal>str2</literal> are valid
76 </para> 86 Scilab instructions.</para>
77 </listitem> 87 </listitem>
78 </itemizedlist> 88 </itemizedlist>
79 <para>Caution: <literal>mtlb_eval</literal> has not to be used for hand coded functions.</para> 89
90 <para>Caution: <literal>mtlb_eval</literal> has not to be used for hand
91 coded functions.</para>
80 </refsection> 92 </refsection>
93
81 <refsection> 94 <refsection>
82 <title>See Also</title> 95 <title>See Also</title>
96
83 <simplelist type="inline"> 97 <simplelist type="inline">
84 <member> 98 <member><link linkend="evstr">evstr</link></member>
85 <link linkend="evstr">evstr</link> 99
86 </member> 100 <member><link linkend="execstr">execstr</link></member>
87 <member>
88 <link linkend="execstr">execstr</link>
89 </member>
90 </simplelist> 101 </simplelist>
91 </refsection> 102 </refsection>
103
92 <refsection> 104 <refsection>
93 <title>Authors</title> 105 <title>Authors</title>
106
94 <simplelist type="vert"> 107 <simplelist type="vert">
95 <member>V.C.</member> 108 <member>V.C.</member>
96 </simplelist> 109 </simplelist>
diff --git a/scilab/modules/compatibility_functions/help/en_US/mtlb_var.xml b/scilab/modules/compatibility_functions/help/en_US/mtlb_var.xml
index 80384c4..8fafa5c 100644
--- a/scilab/modules/compatibility_functions/help/en_US/mtlb_var.xml
+++ b/scilab/modules/compatibility_functions/help/en_US/mtlb_var.xml
@@ -10,98 +10,122 @@
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 * 11 *
12 --> 12 -->
13<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" version="5.0-subset Scilab" xml:lang="en" xml:id="mtlb_var"> 13<refentry version="5.0-subset Scilab" xml:id="mtlb_var" xml:lang="en"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns4="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
14 <info> 20 <info>
15 <pubdate>$LastChangedDate$</pubdate> 21 <pubdate>$LastChangedDate$</pubdate>
16 </info> 22 </info>
23
17 <refnamediv> 24 <refnamediv>
18 <refname>mtlb_var</refname> 25 <refname>mtlb_var</refname>
26
19 <refpurpose>Matlab var emulation function</refpurpose> 27 <refpurpose>Matlab var emulation function</refpurpose>
20 </refnamediv> 28 </refnamediv>
29
21 <refsection> 30 <refsection>
22 <title>Parameters</title> 31 <title>Parameters</title>
23 <variablelist>
24 32
33 <variablelist>
25 <varlistentry> 34 <varlistentry>
26 <term>x</term> 35 <term>x</term>
36
27 <listitem> 37 <listitem>
28 <para>a real or a complex vector or matrix.</para> 38 <para>a real or a complex vector or matrix.</para>
29 </listitem> 39 </listitem>
30 </varlistentry> 40 </varlistentry>
31 41
32 <varlistentry> 42 <varlistentry>
33 <term>s</term> 43 <term>s</term>
44
34 <listitem> 45 <listitem>
35 <para>a real scalar or real vector.</para> 46 <para>a real scalar or real vector.</para>
47
36 <itemizedlist> 48 <itemizedlist>
37 <listitem> 49 <listitem>
38 <para>If x is a vector, s is the variance of x.</para> 50 <para>If x is a vector, s is the variance of x.</para>
39 </listitem> 51 </listitem>
52
40 <listitem> 53 <listitem>
41 <para>If x is a matrix, s is a row vector containing the variance of each column of x.</para> 54 <para>If x is a matrix, s is a row vector containing the
55 variance of each column of x.</para>
42 </listitem> 56 </listitem>
43 </itemizedlist> 57 </itemizedlist>
44
45 </listitem> 58 </listitem>
46 </varlistentry> 59 </varlistentry>
47 60
48 <varlistentry> 61 <varlistentry>
49 <term>w</term> 62 <term>w</term>
63
50 <listitem> 64 <listitem>
51 <para>type of normalization to use. Valid values are, depending on the number of columns m of x :</para> 65 <para>type of normalization to use. Valid values are, depending on
66 the number of columns m of x :</para>
67
52 <itemizedlist> 68 <itemizedlist>
53 <listitem> 69 <listitem>
54 <para>w = 0 : normalizes with m-1, provides the best unbiased estimator of the variance (this is the default).</para> 70 <para>w = 0 : normalizes with m-1, provides the best unbiased
71 estimator of the variance (this is the default).</para>
55 </listitem> 72 </listitem>
73
56 <listitem> 74 <listitem>
57 <para>w = 1: normalizes with m, this provides the second moment around the mean. </para> 75 <para>w = 1: normalizes with m, this provides the second moment
76 around the mean.</para>
58 </listitem> 77 </listitem>
59 </itemizedlist> 78 </itemizedlist>
60
61 </listitem> 79 </listitem>
62 </varlistentry> 80 </varlistentry>
63 81
64 <varlistentry> 82 <varlistentry>
65 <term>dim</term> 83 <term>dim</term>
84
66 <listitem> 85 <listitem>
67 <para>the dimension along which the variance is computed (default is 1, i.e. column by column). 86 <para>the dimension along which the variance is computed (default is
68 If dim is 2, the variance is computed row by row.</para> 87 1, i.e. column by column). If dim is 2, the variance is computed row
88 by row.</para>
69 </listitem> 89 </listitem>
70 </varlistentry> 90 </varlistentry>
71
72 </variablelist> 91 </variablelist>
73 </refsection> 92 </refsection>
93
74 <refsection> 94 <refsection>
75 <title>Description</title> 95 <title>Description</title>
76 <para>This function computes the variance of the values of a vector or matrix x. 96
77It provides the same service as Octave and Matlab. 97 <para>This function computes the variance of the values of a vector or
78It differs from Scilab's variance primitive: </para> 98 matrix x. It provides the same service as Octave and Matlab. It differs
79 <itemizedlist> 99 from Scilab's variance primitive:</para>
80 <listitem> 100
81 <para>mtlb_var returns a real (i.e. with a zero imaginary part) variance, 101 <itemizedlist>
82 even if x is a complex vector or matrix. The Scilab variance 102 <listitem>
83 primitive returns a complex value if the input vector x is complex and 103 <para>mtlb_var returns a real (i.e. with a zero imaginary part)
84 if no option additionnal is used. 104 variance, even if x is a complex vector or matrix. The Scilab variance
85 </para> 105 primitive returns a complex value if the input vector x is complex and
86 </listitem> 106 if no option additionnal is used.</para>
87 <listitem> 107 </listitem>
88 <para>Whatever the type of the input data x (i.e. vector or matrix), 108
89 mtlb_var computes the variance either on dimension 1 or on dimension 2 while, 109 <listitem>
90 if no option is passed to the Scilab's variance primitive, the variance is computed 110 <para>Whatever the type of the input data x (i.e. vector or matrix),
91 on all dimension at once.</para> 111 mtlb_var computes the variance either on dimension 1 or on dimension 2
92 </listitem> 112 while, if no option is passed to the Scilab's variance primitive, the
93 </itemizedlist> 113 variance is computed on all dimension at once.</para>
114 </listitem>
115 </itemizedlist>
94 </refsection> 116 </refsection>
117
95 <refsection> 118 <refsection>
96 <title>Examples</title> 119 <title>Examples</title>
97<para>The following 3 examples illustrates the use of the mtlb_var function.
98In the first case, a column vector is passed to the function, which returns the value 750.
99In the second case, a matrix is passed to the function, which returns the row vector
100[0.16 0.09].
101In the third case, a complex column vector is passed to the function, which
102returns a value close to 2.</para>
103<programlisting role="example"><![CDATA[
104 120
121 <para>The following 3 examples illustrates the use of the mtlb_var
122 function. In the first case, a column vector is passed to the function,
123 which returns the value 750. In the second case, a matrix is passed to the
124 function, which returns the row vector [0.16 0.09]. In the third case, a
125 complex column vector is passed to the function, which returns a value
126 close to 2.</para>
127
128 <programlisting role="example">
105x = [10; 20; 30; 40; 50; 60; 70; 80; 90]; 129x = [10; 20; 30; 40; 50; 60; 70; 80; 90];
106computed = mtlb_var(x); 130computed = mtlb_var(x);
107 131
@@ -113,19 +137,20 @@ computed = mtlb_var(x);
113N=1000; 137N=1000;
114x = grand(N,1,'nor',0,1) + %i*grand(N,1,'nor',0,1); 138x = grand(N,1,'nor',0,1) + %i*grand(N,1,'nor',0,1);
115computed = mtlb_var(x); 139computed = mtlb_var(x);
116 140 </programlisting>
117 ]]></programlisting>
118 </refsection> 141 </refsection>
142
119 <refsection> 143 <refsection>
120 <title>See Also</title> 144 <title>See Also</title>
145
121 <simplelist type="inline"> 146 <simplelist type="inline">
122 <member> 147 <member><link linkend="variance">variance</link></member>
123 <link linkend="variance">variance</link>
124 </member>
125 </simplelist> 148 </simplelist>
126 </refsection> 149 </refsection>
150
127 <refsection> 151 <refsection>
128 <title>Authors</title> 152 <title>Authors</title>
153
129 <simplelist type="vert"> 154 <simplelist type="vert">
130 <member>Michael Baudin</member> 155 <member>Michael Baudin</member>
131 </simplelist> 156 </simplelist>
diff --git a/scilab/modules/compatibility_functions/help/fr_FR/firstnonsingleton.xml b/scilab/modules/compatibility_functions/help/fr_FR/firstnonsingleton.xml
index 78f552a..bc57844 100644
--- a/scilab/modules/compatibility_functions/help/fr_FR/firstnonsingleton.xml
+++ b/scilab/modules/compatibility_functions/help/fr_FR/firstnonsingleton.xml
@@ -10,48 +10,71 @@
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt 10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 * 11 *
12 --> 12 -->
13<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" version="5.0-subset Scilab" xml:lang="fr" xml:id="firstnonsingleton"> 13<refentry version="5.0-subset Scilab" xml:id="firstnonsingleton" xml:lang="fr"
14 xmlns="http://docbook.org/ns/docbook"
15 xmlns:xlink="http://www.w3.org/1999/xlink"
16 xmlns:svg="http://www.w3.org/2000/svg"
17 xmlns:ns4="http://www.w3.org/1999/xhtml"
18 xmlns:mml="http://www.w3.org/1998/Math/MathML"
19 xmlns:db="http://docbook.org/ns/docbook">
14 <info> 20 <info>
15 <pubdate>$LastChangedDate$</pubdate> 21 <pubdate>$LastChangedDate$</pubdate>
16 </info> 22 </info>
23
17 <refnamediv> 24 <refnamediv>
18 <refname>firstnonsingleton</refname> 25 <refname>firstnonsingleton</refname>
26
19 <refpurpose>Trouve la première dimension qui n'est pas 1</refpurpose> 27 <refpurpose>Trouve la première dimension qui n'est pas 1</refpurpose>
20 </refnamediv> 28 </refnamediv>
29
21 <refsynopsisdiv> 30 <refsynopsisdiv>
22 <title>Séquence d'appel</title> 31 <title>Séquence d'appel</title>
32
23 <synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis> 33 <synopsis>[dim]=firstnonsingleton(A[,opt])</synopsis>
24 </refsynopsisdiv> 34 </refsynopsisdiv>
35
25 <refsection> 36 <refsection>
26 <title>Paramètres</title> 37 <title>Paramètres</title>
38
27 <variablelist> 39 <variablelist>
28 <varlistentry> 40 <varlistentry>
29 <term>dim</term> 41 <term>dim</term>
42
30 <listitem> 43 <listitem>
31 <para>première dimension de A qui n'est pas 1</para> 44 <para>première dimension de A qui n'est pas 1</para>
32 </listitem> 45 </listitem>
33 </varlistentry> 46 </varlistentry>
47
34 <varlistentry> 48 <varlistentry>
35 <term>A</term> 49 <term>A</term>
50
36 <listitem> 51 <listitem>
37 <para>une variable de n'importe quel type de donnée Scilab</para> 52 <para>une variable de n'importe quel type de donnée Scilab</para>
38 </listitem> 53 </listitem>
39 </varlistentry> 54 </varlistentry>
55
40 <varlistentry> 56 <varlistentry>
41 <term>opt</term> 57 <term>opt</term>
58
42 <listitem> 59 <listitem>
43 <para>une chaîne de caractères qui précise le type de la variable de sortie que l'on veut</para> 60 <para>une chaîne de caractères qui précise le type de la variable de
61 sortie que l'on veut</para>
62
44 <variablelist> 63 <variablelist>
45 <varlistentry> 64 <varlistentry>
46 <term>"num"</term> 65 <term>"num"</term>
66
47 <listitem> 67 <listitem>
48 <para>la valeur retournée est une valeur numérique</para> 68 <para>la valeur retournée est une valeur numérique</para>
49 </listitem> 69 </listitem>
50 </varlistentry> 70 </varlistentry>
71
51 <varlistentry> 72 <varlistentry>
52 <term>"str"</term> 73 <term>"str"</term>
74
53 <listitem> 75 <listitem>
54 <para>la valeur retournée est une chaîne de caractères si possible ("r" au lieu de 1 et "c" au lieu de 2)</para> 76 <para>la valeur retournée est une chaîne de caractères si
77 possible ("r" au lieu de 1 et "c" au lieu de 2)</para>
55 </listitem> 78 </listitem>
56 </varlistentry> 79 </varlistentry>
57 </variablelist> 80 </variablelist>
@@ -59,28 +82,32 @@
59 </varlistentry> 82 </varlistentry>
60 </variablelist> 83 </variablelist>
61 </refsection> 84 </refsection>
85
62 <refsection> 86 <refsection>
63 <title>Description</title> 87 <title>Description</title>
64 <para> 88
65 Cette fonction est utilisée par <literal>mfile2sci</literal> pour émuler le comportement de Matlab sous Scilab, 89 <para>Cette fonction est utilisée par <literal>mfile2sci</literal> pour
66 en particulier pour les fonctions qui traitent les valeurs suivant la première dimension de A qui n'est pas 1 90 émuler le comportement de Matlab sous Scilab, en particulier pour les
67 en Matlab alors que dans Scilab elles traitent toutes les valeurs de A. 91 fonctions qui traitent les valeurs suivant la première dimension de A qui
68 </para> 92 n'est pas 1 en Matlab alors que dans Scilab elles traitent toutes les
93 valeurs de A.</para>
69 </refsection> 94 </refsection>
95
70 <refsection> 96 <refsection>
71 <title>Exemples</title> 97 <title>Exemples</title>
72 <programlisting role="example"><![CDATA[
73 98
99 <programlisting role="example">
74A = [1 2 3;4 5 6]; 100A = [1 2 3;4 5 6];
75// max Scilab 101// max Scilab
76M = max(A) 102M = max(A)
77// Emulation du max Matlab 103// Emulation du max Matlab
78M = max(A,firstnonsingleton(A)) 104M = max(A,firstnonsingleton(A))
79 105 </programlisting>
80 ]]></programlisting>
81 </refsection> 106 </refsection>
107
82 <refsection> 108 <refsection>
83 <title>Auteurs</title> 109 <title>Auteurs</title>
110
84 <simplelist type="vert"> 111 <simplelist type="vert">
85 <member>V.C.</member> 112 <member>V.C.</member>
86 </simplelist> 113 </simplelist>