how to extract and load images and data from multiple .mat files present in a folder
조회 수: 3 (최근 30일)
이전 댓글 표시
i have a folder containing 3064 .mat files, each mat file contains an image and data regarding that image.I need to load the .mat files and extract data from them
댓글 수: 0
답변 (1개)
Stephen23
2019년 10월 13일
D = 'path to the folder where the files are saved';
S = dir(fullfile(D,'*.mat'));
for k = 1:numel(S)
T = load(fullfile(D,S(k).name));
% do whatever you want with the file data.
end
The imported file data in is the scalar structure T.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Biomedical Imaging에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!