2

All,

Say I want to make a matrix such as:

[2 1 0 0 0]
[1 2 1 0 0]
[0 1 2 1 0]
[0 0 1 2 1]
[0 0 0 1 2]

I know that there is a way to do this in matlab by feeding it:

"command"([1 2 1 0 0])

But I don't remember what the command is, and google is not helpful. Any help?

4

1 回答 1

4
toeplitz([2 1 0 0 0])

可能是您正在寻找的。

于 2013-09-16T20:14:12.810 回答