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;

1 件のコメント

Abhishek
Abhishek 2012 年 5 月 27 日
Thanks! Solves my problem!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by