![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178817/image.png)
Catenate columns in a matrix to one column
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Matt J
2014-5-20
In future, please highlight your code and apply the
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/178817/image.png)
formatting button, as I have just done for you now.
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!