Half-vectorisation function in MATLAB

5 ビュー (過去 30 日間)
Muhammad Prasetyo
Muhammad Prasetyo 2020 年 5 月 27 日
編集済み: Stephen23 2020 年 5 月 27 日
Is there a specific matlab function for a half vectorisation that from square matrix to row vector? I know we can use the reshape function for full vectorization from a 2x2 square matrix to column vector of 4x1.
Example of Half-vectorisation:
[x1x1,x1x2;x2x1,x2x1] to a [x1x1;2*x1x2; x2x2] so from 2x2 square matrix to row vector of 3x1
or
[x1x1,x1x2,x1x3;x2x1,x2x2,x2x3;x3x1,x3x2,x3x3] to a [x1x1;2*x1x2;2*x1x3;x2x2;2*x2x3;x3x3] from 3x3 square matrix to a row vector of 6x1
so its similar to taking the upper triangular of the square matrix

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by