필터 지우기
필터 지우기

Catenate columns in a matrix to one column

조회 수: 1 (최근 30일)
Damith
Damith 2014년 5월 20일
댓글: Damith 2014년 5월 20일
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
Matt J 2014년 5월 20일
In future, please highlight your code and apply the
formatting button, as I have just done for you now.

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2014년 5월 20일
May_CAT=May_Daily(:);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by