Writing Image Names to text file

4 vues (au cours des 30 derniers jours)
kostas asamidis
kostas asamidis le 23 Jan 2018
Commenté : Stephen23 le 4 Juin 2018
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
fid = fopen('names.txt','w');
fprintf(fid,'%s\n',imagenames{:});
fclose(fid);
where imagenames is your name of images.
  3 commentaires
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)

Catégories

En savoir plus sur Low-Level File I/O dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by