handling the parfor loop
2 views (last 30 days)
Show older comments
PIERRE OLIVIER SCHOUEL ATANGANA
on 29 Jul 2021
Commented: PIERRE OLIVIER SCHOUEL ATANGANA
on 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 Comments
Answers (0)
See Also
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!