automate calculate total of images saved in a folder
2 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
Image Analyst
2015-7-10
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!