How to Save Large Variables

5 次查看(过去 30 天)
Old Fox Sexy
Old Fox Sexy 2020-9-18
How to save and load large mat files?
I want to save the wavelet details for my EEG signals(each 111*100000) in a cell named FEATURE.However, it lasts a lot of time to run and after that when I want to save FEATURE in my worksapce and it says"Variable 'a' cannot be saved to a MAT-file whose version is older than 7.3".
I will be so thankful if you ask my question.
here is my code.(sigxx are my signals)
N=16; %Number of Subjects
fs=500; %Sample Freq
nCH=111; %Number of Channels
SIG=cell(16,1);
SIG{1,1}=sig1F;
SIG{2,1}=sig2F;
SIG{3,1}=sig3M;
SIG{4,1}=sig4F;
SIG{5,1}=sig5M;
SIG{6,1}=sig6F;
SIG{7,1}=sig7M;
SIG{8,1}=sig8F;
SIG{9,1}=sig9F;
SIG{10,1}=sig10F;
SIG{11,1}=sig11F;
SIG{12,1}=sig12F;
SIG{13,1}=sig13M;
SIG{14,1}=sig14F;
SIG{15,1}=sig15M;
SIG{16,1}=sig16M;
waveletFunction = 'db8';
CC=cell(N,nCH);
LL=cell(N,nCH);
DA=zeros(9,100000);
FEATURE=cell(N,nCH);
for i=1:N
for k=1:nCH
[CC{i,k},LL{i,k}] = wavedec(SIG{i,1}(k,:),8,waveletFunction);
DA(1,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,1);
DA(2,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,2);
DA(3,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,3);
DA(4,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,4);
DA(5,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,5);
DA(6,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,6);
DA(7,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,7);
DA(8,:)= wrcoef('d',CC{i,k},LL{i,k},waveletFunction,8);
DA(9,:)= wrcoef('a',CC{i,k},LL{i,k},waveletFunction,8);
FEATURE{i,k}=DA;
end
end

回答(1 个)

Walter Roberson
Walter Roberson 2020-9-18
save('filename.mat','FEATURE', '-v7.3')
  1 个评论
Old Fox Sexy
Old Fox Sexy 2020-9-18
Thanks,but I cannot load it.
"Unable to read MAT-file.File might be corrupt."

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by