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

 Akzeptierte Antwort

madhan ravi
madhan ravi am 21 Nov. 2018
Bearbeitet: madhan ravi am 21 Nov. 2018

0 Stimmen

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

3 Kommentare

Hazem El Sankari
Hazem El Sankari am 21 Nov. 2018
Bearbeitet: madhan ravi am 21 Nov. 2018
Thank you so much for your quick reply!
madhan ravi's reply : Anytime :)
Hazem El Sankari
Hazem El Sankari am 21 Nov. 2018
Bearbeitet: madhan ravi am 21 Nov. 2018
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 am 21 Nov. 2018
Thank you again for your quick help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Parallel Computing Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by