Error while storing matrix in a cell

Dear All,
I have written a program to extract components from my data (stored in matrix IMF) using an algorithm and stores these components in a cell array (imfcomponents). I am facing the following error in my program:
??? Conversion to cell from double is not possible.
Error in ==> extractingimf at 14 imfcomponents(epoch,1)=IMF;
Below is my program:
tic; % sub20imfcomp=zeros(41400,3); % imfsizesub20=zeros(23,3); imfcomponents=cell(1799,1); for epoch=1:1:1800 for channel=1:23
e1=e(:,:,epoch);
X=e1(:,channel);
IMF=emd(X);
%below is the line in which the error has occurred
imfcomponents(epoch,1)=IMF;
% [m,n]=size(IMF);
% imfsizesub13(channel,1)=m; % imfsizesub13(channel,2)=channel; % imfsizesub13(channel,3)=epoch; end % index=epoch-1; % sub13imfcomp(((index*23+1):(epoch*23)),:)=imfsizesub13; end save('IMF Components_Subject 20.mat','imfcomponents'); imfextracttime=toc;
Kindly guide me as to how I can overcome this error, thank you.

 채택된 답변

Wayne King
Wayne King 2012년 5월 27일

0 개 추천

Just do:
imfcomponents{epoch} =IMF;
For example:
imfcomponents = cell(1799,1);
IMF = randn(1000,5);
epoch = 1;
imfcomponents{epoch} = x;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

질문:

2012년 5월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by