sorting one field of struct

조회 수: 2 (최근 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 CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by