Hello,
Please how can I change this matrix:
coord =
0 0
10928 0
6928 4000
into this: coord = coord=[0 0 10928 0 6928 4000]
i.e. I want to place the rows next to each other
I want the general form for whatever coord's size is. Usually it's going to be nx2

 採用された回答

madhan ravi
madhan ravi 2018 年 11 月 21 日
編集済み: madhan ravi 2018 年 11 月 21 日

0 投票

m=[ 0 0
10928 0
6928 4000]
m=m'
m=m(:).'

3 件のコメント

Hazem El Sankari
Hazem El Sankari 2018 年 11 月 21 日
編集済み: madhan ravi 2018 年 11 月 21 日
Thank you so much for your quick reply!
madhan ravi's reply : Anytime :)
Hazem El Sankari
Hazem El Sankari 2018 年 11 月 21 日
編集済み: madhan ravi 2018 年 11 月 21 日
Another question please:
if I want to convert the new m vector back to the old one, how can I do that?
madhan ravi's reply :
reshape(m',3,2)
Hazem El Sankari
Hazem El Sankari 2018 年 11 月 21 日
Thank you again for your quick help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeParallel Computing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by