MATLAB: Hello. How to create such a matrix

create matrixinfinite matrix

1 0 2 0 ..
0 2 0 3 ..
2 0 3 0 ..
0 3 0 4 ..
3 0 4 0 ..
: : : :

Best Answer

Another way:
c = [1 0 2 0 3];
r = [3 0 4 0];
h = hankel(c,r)
You'll see
h =
1 0 2 0
0 2 0 3
2 0 3 0
0 3 0 4
3 0 4 0
Related Question