handling the parfor loop
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
PIERRE OLIVIER SCHOUEL ATANGANA
am 29 Jul. 2021
Kommentiert: PIERRE OLIVIER SCHOUEL ATANGANA
am 23 Aug. 2021
in fact, i want to parallelize this function in matlab.
here is the piece of code:
function calcul(h,e,ch3,ch2,ch1)
menu = get(ch2,'Value');
texte=get(ch2,'String');
fich=get(ch1,'string');
fct = texte{menu};
disp(fct);
val= get(ch3,'string');
switch fct
case 'ellipsoide'
disp('ellipsoide');
trouve=0;
[n,m] = size(val);
parfor i=1:m
if val(i)=='1'|| val(i)=='2'||val(i)=='3'||val(i)=='4'||val(i)=='5'||val(i)=='6'||val(i)=='7'||val(i)=='8'||val(i)=='9'||val(i)=='0'
trouve=trouve+1;
end
end
here is the error that shows me : The temporary variable val in a parfor is uninitialized.
3 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!