Matrix Shifting: columns to single row

1 回表示 (過去 30 日間)
Thallon Pitchure
Thallon Pitchure 2019 年 12 月 20 日
コメント済み: Thallon Pitchure 2019 年 12 月 21 日
The problem I am trying to figure out is the I have a 3x3 matrix and I am trying to turn it into a 1x9 by adding the row in sequence into the first row. I am then trying to label each column as 'xxxxx.pt[i]_X' 'xxxxx.p[i]1_Y' 'xxxxx.pt[i]_Z'. I have tried separating each column as a table but I am having trouble with the formating of the row column syntax. Can anyone offered help for a reference for a more in depth matrix syntax.

採用された回答

Jeremy
Jeremy 2019 年 12 月 20 日
A = [1 2 3; 4 5 6; 7 8 9]
B = reshape(A',[1,numel(A)])
  1 件のコメント
Thallon Pitchure
Thallon Pitchure 2019 年 12 月 21 日
Thank you! That worked well.

サインインしてコメントする。

その他の回答 (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