开发者

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

开发者 https://www.devze.com 2023-01-09 12:53 出处:网络
How can I create the followingmatrix? [0 0 0 80 0 98 0 69 8 56 9开发者_开发知识库 45 6] How about the toeplitz function?

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

精彩评论

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