how to extract and load images and data from multiple .mat files present in a folder
4 次查看(过去 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!