Catenate columns in a matrix to one column

1 Ansicht (letzte 30 Tage)
Damith
Damith am 20 Mai 2014
Kommentiert: Damith am 20 Mai 2014
Hi,
I have May_Daily matrix (31 x 13). I need to vertically catenate into one column. I have the following code but it does not catenate all columns but only first two. Any code is useful as I am preparing a 31 x 10000 matrix that does the job until the last column.
for cc=1:12
CAT(:,1)=vertcat(May_Daily(:,cc),May_Daily(:,cc+1));
end
Help is appreciated.
Thanks.
  1 Kommentar
Matt J
Matt J am 20 Mai 2014
In future, please highlight your code and apply the
formatting button, as I have just done for you now.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 20 Mai 2014
May_CAT=May_Daily(:);

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by