| Language Reference |
generates a Hankel matrix
![r = [ a_1 & | & a_2 & | & a_3 & | & ... & | & a_n \ a_2 & | & a_3 & | & a_4 ... ... | & 0 \ \vdots & & & & & & & & \ a_n & | & 0 & | & 0 & | & ... & | & 0 ]](images/langref_langrefeq406.gif)
![a = [ a_1 \ a_2 \ \vdots \ a_n \ ]](images/langref_langrefeq407.gif)
![r = [ a_1 & | & a_2 & | & a_3 & | & ... & | & a_n \ a_2 & | & a_3 & | & a_4 & | & ... & | & 0 \ \vdots \ a_n & | & 0 & | & 0 & | & ... & | & 0 \ ]](images/langref_langrefeq408.gif)
For example, consider the following IML code:
r=hankel({1 2 3 4 5});
This code produces the following output:
R 5 rows 5 cols (numeric)
1 2 3 4 5
2 3 4 5 0
3 4 5 0 0
4 5 0 0 0
5 0 0 0 0
The following statement returns the matrix
r=hankel({1 2 ,
3 4 ,
5 6 ,
7 8});
R 4 rows 4 cols (numeric)
1 2 5 6
3 4 7 8
5 6 0 0
7 8 0 0
The following statement returns a different matrix
r=hankel({1 2 3 4 ,
5 6 7 8});
R 4 rows 4 cols (numeric)
1 2 3 4
5 6 7 8
3 4 0 0
7 8 0 0
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.