concatenating even and odd rows

조회 수: 1 (최근 30일)
Ayesha Punjabi
Ayesha Punjabi 2019년 4월 17일
댓글: Ayesha Punjabi 2019년 4월 17일
I have a matrix. and I am trying to place odd rows on the left side and even rows data on the right sid
which means row 2 data will be placed in 17 to 32 columns of row 1
row 3 data will be placed in row 2 (1 to 16 columns ) and row 4 data will be placed in 17 to 32 columns of row 2.
row 5 data will be placed in row 3 (1 to 16 columns) and row 6 data will be placed in 17 to 32 columns of row 3
Capture.JPG

채택된 답변

Fangjun Jiang
Fangjun Jiang 2019년 4월 17일
A=rand(10,16);
B=[A(1:2:end,:),A(2:2:end,:)]
  댓글 수: 1
Ayesha Punjabi
Ayesha Punjabi 2019년 4월 17일
you saved my life.... thankks a lot

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by