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

« back to all changes in this revision

Viewing changes to modules/m2sci/help/en_US/m2sci_equivalents/h/hankel.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:
12
12
 *
13
13
 -->
14
14
<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="m2sci_hankel">
15
 
  <refnamediv>
16
 
    <refname>hankel (Matlab function)</refname>
17
 
    <refpurpose>Hankel matrix</refpurpose>
18
 
  </refnamediv>
19
 
  <refsection>
20
 
    <title>Matlab/Scilab equivalent</title>
21
 
    <informaltable border="1" width="100%">
22
 
      <tr>
23
 
        <td align="center">
24
 
          <emphasis role="bold">Matlab</emphasis>
25
 
        </td>
26
 
        <td align="center">
27
 
          <emphasis role="bold">Scilab</emphasis>
28
 
        </td>
29
 
      </tr>
30
 
      <tr>
31
 
        <td>
32
 
          <programlisting role="example">hankel</programlisting>
33
 
        </td>
34
 
        <td>
35
 
          <programlisting role="example">hank</programlisting>
36
 
        </td>
37
 
      </tr>
38
 
    </informaltable>
39
 
  </refsection>
40
 
  <refsection>
41
 
    <title>Particular cases</title>
42
 
    <para>The main difference between Scilab and Matlab function is that they
43
 
      do not use the same input values to build an Hankel matrix. If in Matlab,
44
 
      you just have to give a column vector (and eventually a row vector),
45
 
      Scilab function requires the size of the Hankel matrix to build and a
46
 
      covariance sequence vector for this matrix. (See syntax below)
47
 
    </para>
48
 
  </refsection>
49
 
  <refsection>
50
 
    <title>Examples</title>
51
 
    <informaltable border="1" width="100%">
52
 
      <tr>
53
 
        <td align="center">
54
 
          <emphasis role="bold">Matlab</emphasis>
55
 
        </td>
56
 
        <td align="center">
57
 
          <emphasis role="bold">Scilab</emphasis>
58
 
        </td>
59
 
      </tr>
60
 
      <tr>
61
 
        <td>
62
 
          <programlisting role="example">H1 = hankel(C1)
63
 
            H2 = hankel(C2, R2)
64
 
          </programlisting>
65
 
        </td>
66
 
        <td>
67
 
          <programlisting role="example">function H = hankel(C, R)
68
 
            [lhs, rhs] = argn(0);
69
 
            if rhs == 1 then
70
 
            N = size(C, "*");
71
 
            COV = [matrix(C, 1, -1), zeros(1, N)];
72
 
            H = hank(N, N, COV);
73
 
            else
74
 
            M = size(C, "*");
75
 
            N = size(R, "*");
76
 
            COV = [matrix(C, 1, -1), matrix(R(2:$), 1, -1)];
77
 
            H = hank(M, N, COV);
78
 
            end
79
 
            endfunction
80
 
          </programlisting>
81
 
        </td>
82
 
      </tr>
83
 
    </informaltable>
84
 
  </refsection>
 
15
    <refnamediv>
 
16
        <refname>hankel (Matlab function)</refname>
 
17
        <refpurpose>Hankel matrix</refpurpose>
 
18
    </refnamediv>
 
19
    <refsection>
 
20
        <title>Matlab/Scilab equivalent</title>
 
21
        <informaltable border="1" width="100%">
 
22
            <tr>
 
23
                <td align="center">
 
24
                    <emphasis role="bold">Matlab</emphasis>
 
25
                </td>
 
26
                <td align="center">
 
27
                    <emphasis role="bold">Scilab</emphasis>
 
28
                </td>
 
29
            </tr>
 
30
            <tr>
 
31
                <td>
 
32
                    <programlisting role="example">hankel</programlisting>
 
33
                </td>
 
34
                <td>
 
35
                    <programlisting role="example">hank</programlisting>
 
36
                </td>
 
37
            </tr>
 
38
        </informaltable>
 
39
    </refsection>
 
40
    <refsection>
 
41
        <title>Particular cases</title>
 
42
        <para>The main difference between Scilab and Matlab function is that they
 
43
            do not use the same input values to build an Hankel matrix. If in Matlab,
 
44
            you just have to give a column vector (and eventually a row vector),
 
45
            Scilab function requires the size of the Hankel matrix to build and a
 
46
            covariance sequence vector for this matrix. (See syntax below)
 
47
        </para>
 
48
    </refsection>
 
49
    <refsection>
 
50
        <title>Examples</title>
 
51
        <informaltable border="1" width="100%">
 
52
            <tr>
 
53
                <td align="center">
 
54
                    <emphasis role="bold">Matlab</emphasis>
 
55
                </td>
 
56
                <td align="center">
 
57
                    <emphasis role="bold">Scilab</emphasis>
 
58
                </td>
 
59
            </tr>
 
60
            <tr>
 
61
                <td>
 
62
                    <programlisting role="example">H1 = hankel(C1)
 
63
                        H2 = hankel(C2, R2)
 
64
                    </programlisting>
 
65
                </td>
 
66
                <td>
 
67
                    <programlisting role="example">function H = hankel(C, R)
 
68
                        [lhs, rhs] = argn(0);
 
69
                        if rhs == 1 then
 
70
                        N = size(C, "*");
 
71
                        COV = [matrix(C, 1, -1), zeros(1, N)];
 
72
                        H = hank(N, N, COV);
 
73
                        else
 
74
                        M = size(C, "*");
 
75
                        N = size(R, "*");
 
76
                        COV = [matrix(C, 1, -1), matrix(R(2:$), 1, -1)];
 
77
                        H = hank(M, N, COV);
 
78
                        end
 
79
                        endfunction
 
80
                    </programlisting>
 
81
                </td>
 
82
            </tr>
 
83
        </informaltable>
 
84
    </refsection>
85
85
</refentry>