¿How to order 'x' numbers in ascending or descending?
이전 댓글 표시
I did this for two numbers, but I find it difficult for an indefinite amount of numbers (as input vector).
I was thinking of a nested loop.
I have come to this point:
clear;
V=input('Ingrese el vector V= ');
n=length(V);
% Ordenamiento
for i=1:n
채택된 답변
추가 답변 (1개)
Julien
2012년 10월 9일
1 개 추천
Hi, this function already exists on Matlab. It is called 'sort'
Additional information here
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!