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

조회 수: 5 (최근 30일)
Megha
Megha 2019년 4월 10일
댓글: Walter Roberson 2019년 4월 12일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 10일
Use a -v7.3 file, and use matfile() . You can index a single cell array level and assign it to a variable.
  댓글 수: 3
Stephen23
Stephen23 2019년 4월 10일
@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.
Walter Roberson
Walter Roberson 2019년 4월 12일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by