Borrar filtros
Borrar filtros

automate calculate total of images saved in a folder

2 visualizaciones (últimos 30 días)
Melindalee
Melindalee el 10 de Jul. de 2015
Editada: Melindalee el 5 de Ag. de 2015
i don't know how to type for the codings to automatic calculate the total of images saved as '.spm' in a folder and show the number of total on the designed interface using GUIDE.
  2 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 10 de Jul. de 2015
What is your question?
Melindalee
Melindalee el 10 de Jul. de 2015
My question is about automatic calculate the total of images in a folder, i used the coding provided by Mr./Mrs/Miss Image Analyst and it works. Now i faced another problem is that i will have new folder for everyday, so how can i make it to automatic calculate the total of images in the folder everyday.

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 10 de Jul. de 2015
Try something like this:
filePattern = fullfile(yourFolder, '*.spm');
files = dir(filePattern);
numberOfFiles = length(files);
message = sprintf('Total number of spm files = %d', numberOfFiles);
set(handles.text1, 'String', message);
  8 comentarios
Melindalee
Melindalee el 22 de Jul. de 2015
Editada: Melindalee el 22 de Jul. de 2015
yea i do my searching on datenum, currently i just able to get the date and time of computer and play with deduction or subtraction of day, i still havent figure out how to get the modified date of files..
datenow = datestr(clock,0);
dateNowNum = datenum(datenow);
date12hrsBe4r = datestr(dateNowNum-0.50);
this just for finding current time and the time of 12 hours ago..i wanted to make it as a range and calculate how many files which their date and time are within this range, but i still have no idea on how to write the codings, do you still have any suggestion?
Melindalee
Melindalee el 5 de Ag. de 2015
Editada: Melindalee el 5 de Ag. de 2015
I'd found the solution, anyway thank you very much =D

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing 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