convert 262144x1 into 1x262144.

2 Ansichten (letzte 30 Tage)
sami ullah
sami ullah am 27 Sep. 2020
Kommentiert: sami ullah am 27 Sep. 2020
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 Kommentar
sami ullah
sami ullah am 27 Sep. 2020
Thanks. It is done bhy taking transpose.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 27 Sep. 2020
If A is your array..just transpose it.
iwant = A'
Read about transpose.
  4 Kommentare
KSSV
KSSV am 27 Sep. 2020
Yes you can.....but transpose is what it is called as.
Walter Roberson
Walter Roberson am 27 Sep. 2020
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by