Sort the dir loaded files
古いコメントを表示
I am using
imagefiles = dir(fullfile(d, '*.jpg'));
to get the jpg images in a folder that are named numerically like 1.jpg, 2.jpg, ...
I noticed that they are not loaded with their order like 1.jpg, 2.jpg, 3.jpg, ... and they are just randomly loaded like 1.jpg, 10.jpg, 2.jpg, ...
How can I load them with an order
採用された回答
その他の回答 (1 件)
Stephen23
2019 年 11 月 2 日
0 投票
Download my FEX submission natsortfiles and follow the examples in its documentation:
カテゴリ
ヘルプ センター および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!