开发者

How can I create a matrix using vector k=[8 9 6 5 4 3]

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]


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜