¿How to order 'x' numbers in ascending or descending?
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Julien
il 9 Ott 2012
1 voto
Hi, this function already exists on Matlab. It is called 'sort'
Additional information here
1 Commento
Carlos Zuñiga
il 9 Ott 2012
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!