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?

 Réponse acceptée

KSSV
KSSV le 23 Jan 2018

2 votes

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

3 commentaires

KT Naveen
KT Naveen le 4 Juin 2018
can you tell me what this {:} denotes?
KSSV
KSSV le 4 Juin 2018
imagenames is a cell........{:}, this will list all the names of the cell.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by