print all elements of matrix in single row

8 ビュー (過去 30 日間)
raj singh
raj singh 2014 年 12 月 13 日
回答済み: Star Strider 2014 年 12 月 13 日
I have a matrix A=[1 2;3 4]; i wan to single row with all elements of A like like this
B=[1 2 3 4]
Please help me

回答 (1 件)

Star Strider
Star Strider 2014 年 12 月 13 日
This works:
A=[1 2;3 4];
B = A(:).';

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by