<< makematrix_hadamard Makematrix makematrix_hilbert >>

Makematrix >> Makematrix > makematrix_hankel

makematrix_hankel

Returns the Hankel matrix

Calling Sequence

A = makematrix_hankel ( n , x )

Parameters

n :

a 1-by-1 matrix of doubles, integer value, the size of the matrix to return

x :

a m-by-1 or 1-by-m matrix of doubles, the inputs, with m==2*n-1

A :

a n-by-n matrix of doubles, the Hankel matrix

Description

Returns the Hankel matrix of size n. The positive diagonals of the Hankel matrix are constant.

For example, consider n=5 and m=9. If x=[a b c d e f g h i], then the associated 5-by-5 Hankel matrix is

A = [
a b c d e
b c d e f
c d e f g
d e f g h
e f g h i
]

The Hankel matrix satisfies A(i,j) == A(i-1,j+1)

See makematrix_toeplitz for a similar matrix construction.

Examples

n = 5;
x = [1 2 3 4 5 6 7 8 9];
A = makematrix_hankel ( n , x )
expected = [
1  2  3  4  5
2  3  4  5  6
3  4  5  6  7
4  5  6  7  8
5  6  7  8  9
];

Authors

Bibliography

http://en.wikipedia.org/wiki/Hankel_matrix

See also


Report an issue
<< makematrix_hadamard Makematrix makematrix_hilbert >>