Hey everyone I've been looking at parfor and going through some previously given answers and documentation but I'm having a hard time to figure out what my mistake is.
Error: The variable CFxL_Norm in a parfor cannot be classified.
I do assume that CFxLconst_Norm will give the same error. In my script I first assign 2 empty cell-matrix of size (XX,10) and each cell will contain a matrix (501x401x401), except in the last column the cells will contain 1 simple number.
normalisePerc=[0.2, 0.5, 0.8, 1, 0.01, 0.05, 0.1, 0.3, 0.4, 0.6, 0.7, 0.9];
Lnlp=length(normalisePerc);
CFxL_Norm=cell(Lnlp,8+2);
CFxLconst_Norm=cell(Lnlp,8+2);
some other code and then this
A=Ef_Norm{9};
parfor kk=1:Lnlp
fprintf('number %i of %i cycles for normalising \n', kk, Lnlp);
NLP=normalisePerc(kk);
NLPinv=1/NLP;
D=A.*NLPinv;
D(D > 1) = 2./(1+1./D(D > 1));
for tt=1:8
fprintf('number %i of %i steps for normalising \n', tt+(kk-1)*8, Lnlp*8);
tic
B=Ef_Norm{tt}.*NLPinv;
B(B > 1) = 2./(1+1./B(B > 1));
for qq=1:lyq2
CFs=Cafluo_Norm{tt}(:,:,qq)';
CFxL_Norm{kk,tt}(:,:,qq)=CFs.*B(:,:,qq);
CFxLconst_Norm{kk,tt}(:,:,qq)=CFs.*D(:,:,qq);
end
fprintf('Time needed for this step was: \n');
toc
end
tt=9;
for qq=1:lyq2
tmp1=Cafluo_Norm{tt}(:,:,qq)'.*D(:,:,qq);
CFxL_Norm{kk,tt}(:,:,qq)=tmp1;
CFxLconst_Norm{kk,tt}(:,:,qq)=tmp1;
end
end
tt=10;
tmpnlp=num2cell(normalisePerc');
CFxL_Norm(:,10)=tmpnlp;
CFxLconst_Norm(:,tt)=tmpnlp;
clear tt kk NLP A B D NLPinv qq CFs tmp1 tmpnlp
fprintf('\n \n \n');
I don't see any of the problems regarding things, like addressing the same cell at the same time or even multiple times. I am also pretty sure the variables are independent of each other. Thus I don't really understand why I'm still getting this error and what I'm doing wrong.