How I can read '2.tif' before '19.tif'?(my tif files are named as: 1.tif, 2.tif, 3.tiff, ..., 10.tif, 11.tif, ..., 19.tif, 20.tif)
3 views (last 30 days)
Show older comments
Hello, Everyone. I have a folder with 100 tif format images, their names are 1.tif, 2.tif, ..., 100.tif. I wnant read these files from 1 to 100 one after another. I firstly use dir to list all tif image names. But in the listed names, the 2.tif was arranged after 19.tif, the 3.tif was arranged after 29.tif. How can I read 2.tif after 1.tif(before 19.tif)?
1 Comment
Accepted Answer
Image Analyst
on 27 Jul 2017
See Stephen's File Exchange which was a "Pick of the Week": http://blogs.mathworks.com/pick/2014/12/05/natural-order-sorting/
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!