parfor problems ( add attached files)
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Minsik Km
am 6 Jul. 2020
Kommentiert: José Devienne
am 13 Sep. 2021
My code is too slow, so i tried using 'parfor' like below
parfor i = 1:26
etatl=(i*10)+90;
xil=etatl+3;
for j= 1:20
qso=j*0.00005
qmo = 0.001-qso;
fbt_ % this is my code for calculation
end
end
=============================================
but i still get error, 'UndefinedFunction error in 'etatl' worker.
use addAttachedFiles(pool,files) and attach needed files. check 'parallel.Pool/addAttachedFile'.
=====
i checked 'parallel.Pool/addAttachedFile' but i still don't know how to solve the problem..
0 Kommentare
Akzeptierte Antwort
Edric Ellis
am 6 Jul. 2020
I think the problem here is that "fbt_.m" is a script file. You should convert it to a function. More in the doc about scripts and functions here: https://www.mathworks.com/help/matlab/matlab_prog/scripts-and-functions.html .
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu System Commands 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!