what is the result?

1 次查看(过去 30 天)
diadalina
diadalina 2017-10-24
编辑: KSSV 2017-10-24
X a matrix 2 × n containing the coordinates of n points of the plan. How to obtain a matrix where the points are ordered by ascending order of the x-axis?

采纳的回答

KSSV
KSSV 2017-10-24
编辑:KSSV 2017-10-24
n = 100 ;
X = rand(2,n) ; % some random data
[val,idx] = sort(X(1,:),'ascend') ; % sort x values (first row) in ascending order
X = X(:,idx) ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Import, Export, and Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by