convert 262144x1 into 1x262144.

조회 수: 1 (최근 30일)
sami ullah
sami ullah 2020년 9월 27일
댓글: sami ullah 2020년 9월 27일
I have the following: 256x1 double, I want to convert it into 1x256 double. How it will be done?
for example if we have 5x1 double:
12
23
34
56
134
Now convert it into like this: 12 23 34 56 134
  댓글 수: 1
sami ullah
sami ullah 2020년 9월 27일
Thanks. It is done bhy taking transpose.

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

채택된 답변

KSSV
KSSV 2020년 9월 27일
If A is your array..just transpose it.
iwant = A'
Read about transpose.
  댓글 수: 4
KSSV
KSSV 2020년 9월 27일
Yes you can.....but transpose is what it is called as.
Walter Roberson
Walter Roberson 2020년 9월 27일
Yes, you can use reshape() for that, no problem. You can also use
reshape(A, 1, [])
which will automatically figure out the size of A.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by