1 <?xml version="1.0" encoding="UTF-8"?>
3     <refnamediv>
4         <refname>hank</refname>
5         <refpurpose>covariance to hankel matrix</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>hk =hank(m, n, cov)</synopsis>
10     </refsynopsisdiv>
11     <refsection>
12         <title>Arguments</title>
13         <variablelist>
14             <varlistentry>
15                 <term>m</term>
16                 <listitem>
17                     <para>number of bloc-rows</para>
18                 </listitem>
19             </varlistentry>
20             <varlistentry>
21                 <term>n</term>
22                 <listitem>
23                     <para>number of bloc-columns</para>
24                 </listitem>
25             </varlistentry>
26             <varlistentry>
27                 <term>cov</term>
28                 <listitem>
29                     <para>sequence of covariances; it must be given as :[R0 R1
30                         R2...Rk]
31                     </para>
32                 </listitem>
33             </varlistentry>
34             <varlistentry>
35                 <term>hk</term>
36                 <listitem>
37                     <para>computed hankel matrix</para>
38                 </listitem>
39             </varlistentry>
40         </variablelist>
41     </refsection>
42     <refsection>
43         <title>Description</title>
44         <para>This function builds the hankel matrix of size
45             <literal>(m*d,n*d)</literal> from the covariance sequence of a vector
46             process. More precisely:
47         </para>
48         <para>
49             This function builds the hankel matrix of size <literal>(m*d,n*d)</literal>
50             from the covariance sequence of a vector process. More precisely:
51         </para>
52         <para>
53             <latex><![CDATA[ \mathrm{hank}(m, n, [R_0, R_1, R_2, \ldots])=m\mbox{ blocks}\left\{\vphantom{\begin{matrix}R_0\cr R_1\cr R_2\cr\vdots\end{matrix}}\right.\left(\vphantom{\begin{matrix}R_0\cr R_1\cr R_2\cr\vdots\end{matrix}}\right.\overbrace{\begin{matrix}R_0 & R_1 & R_2 & \cdots\cr R_1 & R_2 & \cdots &\cr R_2 & \cdots &&\cr \vdots&&&\cr\end{matrix}}^{n \mbox{ blocks}}\left.\vphantom{\begin{matrix}R_0\cr R_1\cr R_2\cr\vdots\end{matrix}}\right) ]]></latex>
54         </para>
55     </refsection>
56     <refsection>
57         <title>Examples</title>
58         <programlisting role="example">//Example of how to use the hank macro for
59             //building a Hankel matrix from multidimensional
60             //data (covariance or Markov parameters e.g.)
61             //
62             //This is used e.g. in the solution of normal equations
63             //by classical identification methods (Instrumental Variables e.g.)
64             //
65             //1)let's generate the multidimensional data under the form :
66             //  C=[c_0 c_1 c_2 .... c_n]
67             //where each bloc c_k is a d-dimensional matrix (e.g. the k-th correlation
68             //of a d-dimensional stochastic process X(t) [c_k = E(X(t) X'(t+k)], '
69             //being the transposition in scilab)
70             //
71             //we take here d=2 and n=64
73             c = rand(2, 2 * 64)
75             //generate the hankel matrix H (with 4 bloc-rows and 5 bloc-columns)
76             //from the data in c
78             H = hank(4, 5, c);
79         </programlisting>
80     </refsection>
81     <refsection role="see also">
82         <title>See also</title>
83         <simplelist type="inline">
84             <member>