How to create a symmetrical matrix out of a column?

后端 未结 3 1289
南笙
南笙 2021-01-28 16:19

For example, I want to turn the following column:

[90; 175; 600; 650; 655; 660] 

into the matrix:

[ 90, 175, 600, 650, 655, 66         


        
3条回答
  •  鱼传尺愫
    2021-01-28 16:49

    The hankel function can be used to generate the matrix:

    col = [90; 175; 600; 650; 655; 660] 
    result = hankel(col, flip(col));
    

提交回复
热议问题