automate calculate total of images saved in a folder
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Image Analyst
on 10 Jul 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 Comments
More Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!