sorting one field of struct

1 Ansicht (letzte 30 Tage)
Baba
Baba am 30 Mai 2012
files=dir('*.dat');
i want to sort files.name of the files struct by file name

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 30 Mai 2012
[junk, idx] = sort({files.name});
sortedfiles = files(idx);

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by