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

 Accepted Answer

madhan ravi
madhan ravi on 21 Nov 2018
Edited: madhan ravi on 21 Nov 2018
m=[ 0 0
10928 0
6928 4000]
m=m'
m=m(:).'

3 Comments

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

Sign in to comment.

More Answers (0)

Categories

Find more on Parallel Computing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!