Sort the dir loaded files
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Stephen23
el 2 de Nov. de 2019
0 votos
Download my FEX submission natsortfiles and follow the examples in its documentation:
Categorías
Más información sobre File Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!