~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/compatibility_functions/help/en_US/mtlb_rand.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    *
12
12
    -->
13
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_rand">
14
 
  <refnamediv>
15
 
    <refname>mtlb_rand</refname>
16
 
    <refpurpose>Matlab rand emulation function</refpurpose>
17
 
  </refnamediv>
18
 
  <refsection>
19
 
    <title>Description</title>
20
 
    <para>
21
 
      Matlab and Scilab <literal>rand</literal> behave differently in some particular cases:
22
 
    </para>
23
 
    <itemizedlist>
24
 
      <listitem>
25
 
        <para>
26
 
          With a scalar input: Matlab <literal>rand</literal> returns a n x n matrix 
27
 
          while Scilab returns a scalar.
28
 
        </para>
29
 
      </listitem>
30
 
    </itemizedlist>
31
 
    <para>
32
 
      The function <literal>mtlb_rand(A)</literal> is used by
33
 
      <literal>mfile2sci</literal> to replace <literal>rand(A)</literal> when it was not
34
 
      possible to know what was the input while porting Matlab code to Scilab. This function will
35
 
      determine the correct semantic at run time. If you want to have a
36
 
      more efficient code it is possible to replace <literal>mtlb_rand</literal> calls:
37
 
    </para>
38
 
    <itemizedlist>
39
 
      <listitem>
40
 
        <para>
41
 
          If <literal>A</literal> is a scalar
42
 
          <literal>mtlb_rand(A)</literal> may be replaced by <literal>rand(A,A)</literal>
43
 
        </para>
44
 
      </listitem>
45
 
      <listitem>
46
 
        <para>
47
 
          If <literal>A</literal> is not a scalar
48
 
          <literal>mtlb_rand(A)</literal> may be replaced by <literal>rand(A)</literal>
49
 
        </para>
50
 
      </listitem>
51
 
    </itemizedlist>
52
 
    <para>
53
 
      Caution: <literal>mtlb_rand</literal> has not to be used for hand coded functions.
54
 
    </para>
55
 
  </refsection>
 
14
    <refnamediv>
 
15
        <refname>mtlb_rand</refname>
 
16
        <refpurpose>Matlab rand emulation function</refpurpose>
 
17
    </refnamediv>
 
18
    <refsection>
 
19
        <title>Description</title>
 
20
        <para>
 
21
            Matlab and Scilab <literal>rand</literal> behave differently in some particular cases:
 
22
        </para>
 
23
        <itemizedlist>
 
24
            <listitem>
 
25
                <para>
 
26
                    With a scalar input: Matlab <literal>rand</literal> returns a n x n matrix 
 
27
                    while Scilab returns a scalar.
 
28
                </para>
 
29
            </listitem>
 
30
        </itemizedlist>
 
31
        <para>
 
32
            The function <literal>mtlb_rand(A)</literal> is used by
 
33
            <literal>mfile2sci</literal> to replace <literal>rand(A)</literal> when it was not
 
34
            possible to know what was the input while porting Matlab code to Scilab. This function will
 
35
            determine the correct semantic at run time. If you want to have a
 
36
            more efficient code it is possible to replace <literal>mtlb_rand</literal> calls:
 
37
        </para>
 
38
        <itemizedlist>
 
39
            <listitem>
 
40
                <para>
 
41
                    If <literal>A</literal> is a scalar
 
42
                    <literal>mtlb_rand(A)</literal> may be replaced by <literal>rand(A,A)</literal>
 
43
                </para>
 
44
            </listitem>
 
45
            <listitem>
 
46
                <para>
 
47
                    If <literal>A</literal> is not a scalar
 
48
                    <literal>mtlb_rand(A)</literal> may be replaced by <literal>rand(A)</literal>
 
49
                </para>
 
50
            </listitem>
 
51
        </itemizedlist>
 
52
        <para>
 
53
            Caution: <literal>mtlb_rand</literal> has not to be used for hand coded functions.
 
54
        </para>
 
55
    </refsection>
56
56
</refentry>