Yes, indeed, there is a name for this matrix. It is known as the Hankel matrix .
Use the function hankel
in MATLAB:
out = hankel(1:n,n:2*n-1);
Example with n=10
:
out =
1 2 3 4 5 6 7 8 9 10
2 3 4 5 6 7 8 9 10 11
3 4 5 6 7 8 9 10 11 12
4 5 6 7 8 9 10 11 12 13
5 6 7 8 9 10 11 12 13 14
6 7 8 9 10 11 12 13 14 15
7 8 9 10 11 12 13 14 15 16
8 9 10 11 12 13 14 15 16 17
9 10 11 12 13 14 15 16 17 18
10 11 12 13 14 15 16 17 18 19
In addition, you may want to use bsxfun
. This is certainly possible:
out = bsxfun(@plus, (1:n), (0:n-1).');
, , , repmat
, , , . repmat
bsxfun
, .