Effacer les filtres
Effacer les filtres

how to sort only first column in matlab

2 vues (au cours des 30 derniers jours)
abdul wahab  aziz
abdul wahab aziz le 27 Août 2016
X=0.5 1.0;0.1 2;2.5 4 output must be like 0.1 2;0.5 1.0;2.5 4

Réponse acceptée

Star Strider
Star Strider le 27 Août 2016
Use the sortrows funciton:
X = [0.5 1.0;0.1 2;2.5 4];
Output = sortrows(X, 1)
Output =
0.1 2
0.5 1
2.5 4

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by