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 Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by