How can I create a triangular matrix based on a vector, in MATLAB?

前端 未结 4 2226
渐次进展
渐次进展 2021-02-20 02:55

Let\'s say I\'ve got a vector like this one:

A = [101:105]

Which is really:

[ 101, 102, 103, 104, 105 ]

And I

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-20 03:26

    hankel(A) will get you the first matrix

    triu(toeplitz(A)) will get you the second one.

    --Loren

提交回复
热议问题