MATLAB Answers

Matrix Shifting: columns to single row

5 views (last 30 days)
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.

  0 Comments

Sign in to comment.

Accepted Answer

Jeremy Marcyoniak
Jeremy Marcyoniak on 20 Dec 2019
A = [1 2 3; 4 5 6; 7 8 9]
B = reshape(A',[1,numel(A)])

  1 Comment

Sign in to comment.

More Answers (0)