필터 지우기
필터 지우기

customizing the index of reshape A 2X2 matrix

조회 수: 1 (최근 30일)
ali akbar
ali akbar 2020년 9월 6일
댓글: ali akbar 2020년 9월 6일
So I have a 2x2 matrix
test=[1 2;16 9]
y=reshape(test,[],1)
which returns
1
16
2
9
I want it to reshape like this
1
2
16
9
Any suggestion would be highly appreciated.

채택된 답변

madhan ravi
madhan ravi 2020년 9월 6일
Transpose Test before reshaping.
  댓글 수: 2
madhan ravi
madhan ravi 2020년 9월 6일
y = reshape(test.', [], 1)
ali akbar
ali akbar 2020년 9월 6일
Thank you madhan. I just realized how naive I was, I haven't thought about this simple thing beforehand.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by