How to copy rows of a matrix to convert it into single row??

3 ビュー (過去 30 日間)
Maruti Patil
Maruti Patil 2016 年 4 月 6 日
回答済み: Star Strider 2016 年 4 月 6 日
Suppose I have got A=[1 2; 3 4; 5 6; 7 8]
Now I want output as B=[1 2 3 4 5 6 7 8]
How to do this?
Thanx

採用された回答

Star Strider
Star Strider 2016 年 4 月 6 日
Use the reshape function:
A=[1 2; 3 4; 5 6; 7 8];
B = reshape(A', 1, [])
B =
1 2 3 4 5 6 7 8

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by