ordering columns
Show older comments
dear colleagues, who has save my job at various situations:
i'm dealining with a code in topographic analysis, the requiered assistance is next:
i got a table A
A=
379 700782,872000000 6015755,46600000 700487,673000000 6015992,71900000
121 700487,673000000 6015992,71900000 700563,348000000 6016086,87700000
379 700563,348000000 6016086,87700000 700858,548000000 6015849,62400000
398 700487,673000000 6015992,71900000 700858,548000000 6015849,62400000
398 700782,872000000 6015755,46600000 700563,348000000 6016086,87700000
121 700782,872000000 6015755,46600000 700858,548000000 6015849,62400000
composed by various
the first is g, and the rest are defined as x1, y1, x2, y2
the question is:
i need to order the table rows with the minor values of the pairs of rows x1 and y1 in ascendent order from top to bottom.
conditions:
the entire row is not modifiable, maintaining intact the rows structure, because are pair of coordinates.
so the requested that i have found in the example before is:
121 700487,673000000 6015992,71900000 700563,348000000 6016086,87700000
121 700782,872000000 6015755,46600000 700858,548000000 6015849,62400000
there are two possibilities, beacuse exist and x and an y values¡¡¡¡
what i'm searching for is the coordinate near to the center than the other (of the cartesian plane X=0 and Y=0). In other word, from this two answers select which-one is the more near of the center of the axes x and y (0,0)
i hope u understand the problem.... is a little bit complicated but well redacted.
Greetings from Congo
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!