フィルターのクリア

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

Community Treasure Hunt

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

Start Hunting!

Translated by