how can i read the 180 images in exact sequence 1,2,3...180 similar to it is stored in database??.i already rename all the images by 1,2,3..180. in database.

i have a code for read 180 images..but this code are not giving me to read the image in exact sequence of 1,2,3..180..i mean all the images are read randomly here.. i want it in sequence of 1,2,3..180.so i can further proceed it in same sequence.

Answers (2)

You can use my FEX submission natsortfiles, which sorts filenames into the order taking into account any numeric values in the strings, for example:
>> B = {'test2.m'; 'test10-old.m'; 'test.m'; 'test10.m'; 'test1.m'};
>> natsortfiles(B)
>> ans =
'test.m'
'test1.m'
'test2.m'
'test10.m'
'test10-old.m'
This file also needs my FEX submission natsort to work.

Tags

No tags entered yet.

Asked:

on 21 Jan 2016

Edited:

on 21 Jan 2016

Community Treasure Hunt

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

Start Hunting!