Solution to "MatFile objects must be scalar. Try assigning the object to a scalar variable."?
Show older comments
I have quite a few .mat files that I used to load them. But it uses too much memory. I tried to use matfile instead of load but I couldn't.
for i = 1:numel(files)
I2(i) = matfile(['saved_images/2/read/', files(i).name]);
end
It gives me this error:
MatFile objects must be scalar. Try assigning the object to a scalar variable.
I have to use them as an array. I can't use a MatFile variable for each .mat file. What is the best way to solve this problem?
Accepted Answer
More Answers (0)
Categories
Find more on Workspace Variables and MAT Files 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!