My problem is the following: I have a vector as
[3,4,5,6,7]
I want to create a matrix as
3 0 0 0 0
3 4 0 0 0
3 4 5 0 0
3 4 5 6 0
3 4 5 6 7
However, I don’t want to use for loops because of the problem of size that I will eventually get.
I was thinking about using flipud, fliprl, hankel and toeplitz functions but cannot find a solution.
Try this: