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

« back to all changes in this revision

Viewing changes to modules/elementary_functions/help/en_US/matrixmanipulation/resize_matrix.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:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="resize_matrix" xml:lang="en">
14
 
  <refnamediv>
15
 
    <refname>resize_matrix</refname>
16
 
    <refpurpose>create a new matrix with a different size</refpurpose>
17
 
  </refnamediv>
18
 
  <refsynopsisdiv>
19
 
    <title>Calling Sequence</title>
20
 
    <synopsis>resMat = resize_matrix(mat,nbRow,nbCol,[typeOfMat])</synopsis>
21
 
  </refsynopsisdiv>
22
 
  <refsection>
23
 
    <title>Arguments</title>
24
 
    <variablelist>
25
 
      <varlistentry>
26
 
        <term>mat</term>
27
 
        <listitem>
28
 
          <para>input matrix from which the resized matrix will be
29
 
            created.
30
 
          </para>
31
 
        </listitem>
32
 
      </varlistentry>
33
 
      <varlistentry>
34
 
        <term>nbRow</term>
35
 
        <listitem>
36
 
          <para>number of row of the resized matrix.</para>
37
 
        </listitem>
38
 
      </varlistentry>
39
 
      <varlistentry>
40
 
        <term>nbCol</term>
41
 
        <listitem>
42
 
          <para>number of column of the resized matrix.</para>
43
 
        </listitem>
44
 
      </varlistentry>
45
 
      <varlistentry>
46
 
        <term>typeOfMat</term>
47
 
        <listitem>
48
 
          <para>caracter string, type name of the resized matrix.</para>
49
 
        </listitem>
50
 
      </varlistentry>
51
 
      <varlistentry>
52
 
        <term>resMat</term>
53
 
        <listitem>
54
 
          <para>resized matrix.</para>
55
 
        </listitem>
56
 
      </varlistentry>
57
 
    </variablelist>
58
 
  </refsection>
59
 
  <refsection>
60
 
    <title>Description</title>
61
 
    <para>
62
 
      Create a matrix of size <literal>nbRow</literal> x
63
 
      <literal>nbCol</literal> and whose elements <literal>(i,j)</literal> are
64
 
      <literal>mat(i,j)</literal> if <literal>(i,j)</literal> is in the range of
65
 
      the input matrix. Otherwise elements <literal>(i,j)</literal> are
66
 
      <literal>0</literal> for real or integer matrices, <literal>%f</literal>
67
 
      for boolean matrices and an empty string for string matrices.
68
 
    </para>
69
 
    <para>The type of the output matrix may be modified by specifying the
70
 
      <literal>typeOfMat</literal> argument. In this case, be sure that the
71
 
      input matrix type is compatible with this one.
72
 
    </para>
73
 
    <para>For now, only real, integer matrices, boolean and character string
74
 
      matrices are supported. This means that <literal>typeOfMat</literal> must
75
 
      be chosen within: 'constant', 'boolean', 'string' or any integer type
76
 
      ('int8', 'int16',...).
77
 
    </para>
78
 
  </refsection>
79
 
  <refsection>
80
 
    <title>Examples</title>
81
 
    <programlisting role="example"><![CDATA[ 
 
14
    <refnamediv>
 
15
        <refname>resize_matrix</refname>
 
16
        <refpurpose>create a new matrix with a different size</refpurpose>
 
17
    </refnamediv>
 
18
    <refsynopsisdiv>
 
19
        <title>Calling Sequence</title>
 
20
        <synopsis>resMat = resize_matrix(mat,nbRow,nbCol,[typeOfMat])</synopsis>
 
21
    </refsynopsisdiv>
 
22
    <refsection>
 
23
        <title>Arguments</title>
 
24
        <variablelist>
 
25
            <varlistentry>
 
26
                <term>mat</term>
 
27
                <listitem>
 
28
                    <para>input matrix from which the resized matrix will be
 
29
                        created.
 
30
                    </para>
 
31
                </listitem>
 
32
            </varlistentry>
 
33
            <varlistentry>
 
34
                <term>nbRow</term>
 
35
                <listitem>
 
36
                    <para>number of row of the resized matrix.</para>
 
37
                </listitem>
 
38
            </varlistentry>
 
39
            <varlistentry>
 
40
                <term>nbCol</term>
 
41
                <listitem>
 
42
                    <para>number of column of the resized matrix.</para>
 
43
                </listitem>
 
44
            </varlistentry>
 
45
            <varlistentry>
 
46
                <term>typeOfMat</term>
 
47
                <listitem>
 
48
                    <para>caracter string, type name of the resized matrix.</para>
 
49
                </listitem>
 
50
            </varlistentry>
 
51
            <varlistentry>
 
52
                <term>resMat</term>
 
53
                <listitem>
 
54
                    <para>resized matrix.</para>
 
55
                </listitem>
 
56
            </varlistentry>
 
57
        </variablelist>
 
58
    </refsection>
 
59
    <refsection>
 
60
        <title>Description</title>
 
61
        <para>
 
62
            Create a matrix of size <literal>nbRow</literal> x
 
63
            <literal>nbCol</literal> and whose elements <literal>(i,j)</literal> are
 
64
            <literal>mat(i,j)</literal> if <literal>(i,j)</literal> is in the range of
 
65
            the input matrix. Otherwise elements <literal>(i,j)</literal> are
 
66
            <literal>0</literal> for real or integer matrices, <literal>%f</literal>
 
67
            for boolean matrices and an empty string for string matrices.
 
68
        </para>
 
69
        <para>The type of the output matrix may be modified by specifying the
 
70
            <literal>typeOfMat</literal> argument. In this case, be sure that the
 
71
            input matrix type is compatible with this one.
 
72
        </para>
 
73
        <para>For now, only real, integer matrices, boolean and character string
 
74
            matrices are supported. This means that <literal>typeOfMat</literal> must
 
75
            be chosen within: 'constant', 'boolean', 'string' or any integer type
 
76
            ('int8', 'int16',...).
 
77
        </para>
 
78
    </refsection>
 
79
    <refsection>
 
80
        <title>Examples</title>
 
81
        <programlisting role="example"><![CDATA[ 
82
82
// number matrix
83
83
myMat = 5 * rand( 3, 4 )
84
84
myMat = resize_matrix( myMat, 3, 3 ) // reduce the matrix size
90
90
myMatString = ["Scilab","the";"Open Source","Scientific";"Software","Package"]
91
91
myMatString = resize_matrix( myMatString, 3, 1 )
92
92
 ]]></programlisting>
93
 
  </refsection>
94
 
  <refsection role="see also">
95
 
    <title>See Also</title>
96
 
    <simplelist type="inline">
97
 
      <member>
98
 
        <link linkend="matrix">matrix</link>
99
 
      </member>
100
 
      <member>
101
 
        <link linkend="size">size</link>
102
 
      </member>
103
 
      <member>
104
 
        <link linkend="typeof">typeof</link>
105
 
      </member>
106
 
    </simplelist>
107
 
  </refsection>
 
93
    </refsection>
 
94
    <refsection role="see also">
 
95
        <title>See Also</title>
 
96
        <simplelist type="inline">
 
97
            <member>
 
98
                <link linkend="matrix">matrix</link>
 
99
            </member>
 
100
            <member>
 
101
                <link linkend="size">size</link>
 
102
            </member>
 
103
            <member>
 
104
                <link linkend="typeof">typeof</link>
 
105
            </member>
 
106
        </simplelist>
 
107
    </refsection>
108
108
</refentry>