sorting one field of struct

4 ビュー (過去 30 日間)
Baba
Baba 2012 年 5 月 30 日
files=dir('*.dat');
i want to sort files.name of the files struct by file name

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 30 日
[junk, idx] = sort({files.name});
sortedfiles = files(idx);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by