我如何使用Matlab使用带有滞后的向量创建矩阵 [英] how can i create a matrix using vector with lag using matlab

查看:312
本文介绍了我如何使用Matlab使用带有滞后的向量创建矩阵的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

vector=
3
4
8
5
2
1
6

the matrix i want to 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]);

这篇关于我如何使用Matlab使用带有滞后的向量创建矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆