How to generate an array of Hankel and Toeplitz from a defined array?

How to generate a matrix of H and a matrix of T, and my matrix to generate these other two has dimension 4x4
1 22 3 4
23 32 11 10
55 88 63 3
4 8 10 5
with the H matrix being
22 3 4
3 4 0
4 0 0
and the T matrix being
1 22 3
0 1 22
0 0 22
Thus, the matrices of H and T have this behavior described in the last two matrices. Thanks any help!

 Réponse acceptée

A =
1 22 3 4
23 32 11 10
55 88 63 3
4 8 10 5
>> H=hankel(A(1,2:4))
H =
22 3 4
3 4 0
4 0 0
>> T=triu(toeplitz(A(1,1:3)))
T =
1 22 3
0 1 22
0 0 1

Plus de réponses (0)

Catégories

Question posée :

GTA
le 4 Juil 2019

Commenté :

GTA
le 5 Juil 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by