Load multiple struct 1x1 mat files
Show older comments
Hey guys!
I am having trouble when trying to load several mat files which consist of RMN images. The files are struct 1x1 and if I try to create a loop for loading files, Matlab loads only the first image in the variable named cjdata.
Has anyone else had this problem and found a solution?
Thanks!
filenames={'1550.mat','1549.mat','1548.mat','1547.mat','1546.mat','1545.mat','1544.mat',...
'1543.mat','1542.mat','1541.mat'};
for kk = 1:numel(filenames)
load(filenames{kk})
end
2 Comments
Beatrice Milik please show us the code you are using, either as text in your question or uploaded as a text file (simply by clicking the paperclip button).
"Has anyone else had this problem and found a solution?"
Most likely you just need to use indexing, exactly like the examples here:
Beatrice Milik
on 23 Apr 2019
Accepted Answer
More Answers (0)
Categories
Find more on Structures 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!