Posted By

eiger_824 on 11/11/15


Tagged

adsf


Versions (?)

Greatest2Least()


 / Published in: MatLab
 

URL: fdsfasdf

fdasfdasf

  1. function [B,C] = Greatest2Least(A)
  2. for i=1:length(A)
  3. for j=i:length(A)
  4. if A(j,1) > A(i,1)
  5. b = A(i,:);
  6. A(i,:) = A(j,:);
  7. A(j,:) = b;
  8. end
  9. end
  10. end
  11. B = A;
  12. %C = zeros(1,length(B));
  13. for k=1:length(B)
  14. C(k,1:3) = Number2CountryMapper(B(k,2));
  15. end
  16. end

Report this snippet  

You need to login to post a comment.