Writing Image Names to text file

I have a file with images(Filename) with format:
vi_xxxxx
where, 1<i<5 and xxxxx varies between 00000-01164 ,different for each i.I have 4 images in each row. I want
to create a text file with these images' names.
For example:
v0_00000
v5_00001
v5_00002
........
etc
Any idea of how this can be done?

 Accepted Answer

fid = fopen('names.txt','w');
fprintf(fid,'%s\n',imagenames{:});
fclose(fid);
where imagenames is your name of images.

More Answers (0)

Asked:

on 23 Jan 2018

Commented:

on 4 Jun 2018

Community Treasure Hunt

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

Start Hunting!