Effacer les filtres
Effacer les filtres

automate calculate total of images saved in a folder

2 vues (au cours des 30 derniers jours)
Melindalee
Melindalee le 10 Juil 2015
Modifié(e) : Melindalee le 5 Août 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 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 10 Juil 2015
What is your question?
Melindalee
Melindalee le 10 Juil 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.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 10 Juil 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 commentaires
Melindalee
Melindalee le 22 Juil 2015
Modifié(e) : Melindalee le 22 Juil 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 le 5 Août 2015
Modifié(e) : Melindalee le 5 Août 2015
I'd found the solution, anyway thank you very much =D

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing 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