Reputation: 471
How can I create the following matrix?
[0 0 0 8 0 0 9 8 0 6 9 8 5 6 9 4 5 6]
Upvotes: 1
Views: 133
Reputation: 45105
How about the toeplitz function?
c=[0 8 9 6 5 4 3] r=[0 0 0] t=toeplitz(c,r)
(Disclaimer: untested!)
T should be:
0 0 0 8 0 0 9 8 0 6 9 8 5 6 9 4 5 6 3 4 5