parallel computing // how to use parfor
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Pranav Verma
le 11 Déc 2020
Hi kyoung,
Please provide with error and your .xls file so that we can reproduce the error.
In the meanwhile, you can go through the Problem with parfor classified variable and see if it helps.
Thanks
0 commentaires
Voir également
Catégories
En savoir plus sur Parallel for-Loops (parfor) dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!