Writing Image Names to text file

5 visualizaciones (últimos 30 días)
kostas asamidis
kostas asamidis el 23 de En. de 2018
Comentada: Stephen23 el 4 de Jun. de 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?

Respuesta aceptada

KSSV
KSSV el 23 de En. de 2018
fid = fopen('names.txt','w');
fprintf(fid,'%s\n',imagenames{:});
fclose(fid);
where imagenames is your name of images.
  3 comentarios
KSSV
KSSV el 4 de Jun. de 2018
imagenames is a cell........{:}, this will list all the names of the cell.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Low-Level File I/O en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by