load only a few cells like {1,1} to {10,1} from info.mat file.

my varaible named "info" is saved in info.mat file that contains 52x1 cells. Since it is too large in memory. I cannot load it altogether! and matlab thorws error.
So there any possible way that I can load only a few cells like {1,1} to {10,1} from info.mat file.

Réponses (1)

Walter Roberson
Walter Roberson le 10 Avr 2019
Use a -v7.3 file, and use matfile() . You can index a single cell array level and assign it to a variable.

3 commentaires

I am sorry I didnt understand the command.
I tried
m = matfile(info.mat{1,1}); % error message
m = matfile('info.mat{1,1}'); % it created matlab class file instead of loading cells
variable name is "info" that has 52x1 cells and file name is "info.mat".
@Megha: did you read the matfile documentation? I do not see any examples in the documentation that look anything like the syntax that you just invented.
m = matfile('info.mat');
m1 = m.info{1,1};
Now you can index into m1, such as m1(:,3) . Because of limitations of matfile, it is not possible to directly index such as
m.info{1,1}(:,3) %not permitted for matfile

Connectez-vous pour commenter.

Catégories

Question posée :

le 10 Avr 2019

Commenté :

le 12 Avr 2019

Community Treasure Hunt

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

Start Hunting!

Translated by