开发者

how can i create a matrix using vector with lag using matlab

开发者 https://www.devze.com 2023-01-09 01:44 出处:网络
vector= 3 4 8 5 2 1 6 the matrix i want to开发者_JS百科 create is 3 0 0 4 3 0 8 4 3 5 8 4 2 5 8 1 2 5 6 1 2 This was already covered in one of your previous questions. Although you aren\'t trying to
vector=
3
4
8
5
2
1
6

the matrix i want to开发者_JS百科 create is
3 0 0
4 3 0
8 4 3
5 8 4
2 5 8
1 2 5
6 1 2


This was already covered in one of your previous questions. Although you aren't trying to create a square matrix in this example, you can still use the TOEPLITZ function like in Jonas' answer:

M = toeplitz(vector,[vector(1) 0 0]);
0

精彩评论

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

关注公众号