Let\'s say I\'ve got a vector like this one:
A = [101:105]
Which is really:
[ 101, 102, 103, 104, 105 ]
And I
For generating such triangular matrices with such a regular pattern, use the toeplitz function, e.g.
m=toeplitz([1,0,0,0],[1,2,3,4])
for the other case, use rot90(m)
rot90(m)