change dimension of data

조회 수: 1 (최근 30일)
Jay Hanuman
Jay Hanuman 2017년 1월 20일
댓글: Adam 2017년 1월 20일
I have data in ab with n rows and 4 columns. I made it 1*n by
ab1=ab'
then
ab2=ab1(:).'
I want it back ab2 in ab format i.e. n*4. how to do it.

답변 (1개)

the cyclist
the cyclist 2017년 1월 20일
reshape(ab2,n,4)
  댓글 수: 2
Jay Hanuman
Jay Hanuman 2017년 1월 20일
편집: Jay Hanuman 2017년 1월 20일
its doing 1st n element in 1st column then next n element in next column likewise, I want that 1st 4 element in 1st row, then next 4 element in 2nd row, likewise
Adam
Adam 2017년 1월 20일
reshape( ab2, 4, n )'

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by