Matrix Manipulation Image Processing

1 Ansicht (letzte 30 Tage)
Jes
Jes am 27 Mai 2015
Kommentiert: Walter Roberson am 6 Aug. 2015
I have a matrix of 100 rows and 2 columns. How to sort the first column of the matrix and write the corresponding second column elements. Please help me. Its Urgent.Thanks in Advance

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 27 Mai 2015
A = rand(100,2); % your matrix
[~,ii] = sort(A(:,1));
out = A(ii,:);
  1 Kommentar
Jes
Jes am 27 Mai 2015
Thanks a lot. It works. Could you please explain me once . Thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

James Tursa
James Tursa am 27 Mai 2015

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by