Borrar filtros
Borrar filtros

how to sort only first column in matlab

2 visualizaciones (últimos 30 días)
abdul wahab  aziz
abdul wahab aziz el 27 de Ag. de 2016
Respondida: Star Strider el 27 de Ag. de 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

Respuesta aceptada

Star Strider
Star Strider el 27 de Ag. de 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

Más respuestas (0)

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by