Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Sorting an array in matlab

1 visualización (últimos 30 días)
Kenneth Morley
Kenneth Morley el 11 de En. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello all:
I am trying to sort an array by the names of counties but I am struggling on how to do this. I have attached a picture of what the array looks like. Thanks for your help!

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 11 de En. de 2014
Editada: Azzi Abdelmalek el 11 de En. de 2014
col=7
out=sortrows(A,col)
Example
A={1 'A' 'Baldwin';2 'B' 'Walton';3 'C' 'Jackson'}
col=3
out=sortrows(A,col)
  2 comentarios
Kenneth Morley
Kenneth Morley el 11 de En. de 2014
Thank you for your answer! However, I get the "too many input arguments error"
Azzi Abdelmalek
Azzi Abdelmalek el 11 de En. de 2014
Post a sample of your data ( 5 rows)

La pregunta está cerrada.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by