The source code for the parfor-loop could not be found
Mostrar comentarios más antiguos
Hi. I'm using the parfor in order to change some labels name:
Data = cell(1, length(DirList));
numberOfDbExamples = length(DirList);
parfor k = 1:numberOfDbExamples
Data{k} = load(fullfile(Folder, DirList(k).name));
[newLabelNames, newMask] = changeLabelNames(Data{k}.labelNames, Data{k}.mask);
Data{k}.labelNames = newLabelNames;
Data{k}.mask = newMask;
end
I get this error:
The source code (C:----) for the parfor-loop that is trying to execute on the worker could not be found.
Caused by:
Undefined function changeLabelNames for input arguments of type table.
Error using remoteParallelFunction
Do you have an idea of how fix it?
3 comentarios
Walter Roberson
el 30 de Sept. de 2022
Where have you stored changeLabelNames relative to the current directory at the time of execution of the parfor ? And is it in its own file changeLabelNames.m or is it a local function inside your script ? Is it possibly a method of some object class?
Are you expecting your mat files to have a variable named labelNames and expecting it to be a table() object ?
John
el 30 de Sept. de 2022
Mehdi
el 20 de En. de 2023
can you explain how you solved this problem? I faced similar error!
Respuesta aceptada
Más respuestas (1)
John
el 21 de En. de 2023
0 votos
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!