sorting one field of struct

files=dir('*.dat');
i want to sort files.name of the files struct by file name

 채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 30일

0 개 추천

[junk, idx] = sort({files.name});
sortedfiles = files(idx);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

질문:

2012년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by