handling the parfor loop
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
PIERRE OLIVIER SCHOUEL ATANGANA
il 29 Lug 2021
Commentato: PIERRE OLIVIER SCHOUEL ATANGANA
il 23 Ago 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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Call Python from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!