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.
댓글 수: 2
채택된 답변
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!