sorting one field of struct

4 visualizzazioni (ultimi 30 giorni)
Baba
Baba il 30 Mag 2012
files=dir('*.dat');
i want to sort files.name of the files struct by file name

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by