Solution to "MatFile objects must be scalar. Try assigning the object to a scalar variable."?

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?

 채택된 답변

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

질문:

2017년 12월 25일

답변:

2017년 12월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by