My code is as below. But error occurs.
("Solve Variable Classification Issues in parfor-Loops" )
I don't know why error occur.
How to solve it??
%% definition of variables
nov = 30 ;
nov_down = -512 ;
nov_up = 512 ;
iter = 5000 ;
nohm = 4 ;
HMCR_down = 0.8 ;
HMCR_up = 1 ;
PAR_down = 0.2 ;
PAR_up = 0.4 ;
bw_down = 0.01 ;
bw_up = 1 ;
runn = 1 ;
HMS = 15 ;
initial=xlsread('HMS15,nov30,-512,512.xlsx');
HM=zeros(nohm,HMS,nov);
parfor i = 1:nohm
HMCR(i) = round(HMCR_down + (HMCR_up-HMCR_down)*rand,2) ;
PAR(i) = round(PAR_down + (PAR_up-PAR_down)*rand,2) ;
bw(i) = round(bw_down + (bw_up-bw_down)*rand,2) ; ;
virtual=zeros(HMS,nov);
virtual(1:HMS,1:nov)=initial;
HM(i,1:HMS,1:nov)= virtual ;
end