omment rearranger une matrce long en une seul ligne

1 回表示 (過去 30 日間)
alize beemiel
alize beemiel 2023 年 11 月 30 日
コメント済み: alize beemiel 2023 年 11 月 30 日
hello
i have a long matrix with over 1000 line and 2 column
exemple
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1]
and i want restrut my matrix like this
b=[ 16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1]
some help please

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 11 月 30 日
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1];
B = reshape(A.', 1, [])
ans = 1×16
16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by