cell to mat-file
Show older comments
Hi
As far as i know partial loading with MAT-file does not support a variable of cell class. My question is if there exists a some way to partial load a cell of size 1x n
Accepted Answer
More Answers (2)
Image Analyst
on 10 May 2015
Why not just load the one variable that you're interested in:
storedStructure = load(matFullFileName, 'yourCell');
yourCell = storedStructure.yourCell;
5 Comments
Maciek
on 10 May 2015
Walter Roberson
on 10 May 2015
Image Analyst is proposing to load the entire variable and then work with it. That could cause problems if the variable was very large.
Maciek
on 10 May 2015
Maciek
on 10 May 2015
Image Analyst
on 10 May 2015
I was proposing to store manageable size variables into your mat file, like Walter did. Then you can pull out just one manageable chunk at a time. A cell array of 100,000 cells is not necessarily that big - it depends on what is in each cell. What is in a typical cell? Just a few numbers or like an image or something? If it was so big, then how did you have it in your program in the first place to even be able to save it out with save()???
Jan
on 10 May 2015
c = cell(1, 100);
d = pi;
save('a.mat', 'c', 'd');
clear
cc = load('a.mat', 'c'); % ==> cc.c : {1x100 cell}
So why do you mean that the partial loading does not work with cells?
Categories
Find more on Low-Level File I/O 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!