The source code for the parfor-loop could not be found

107 views (last 30 days)
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;
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?
Mehdi on 20 Jan 2023 at 16:52
can you explain how you solved this problem? I faced similar error!

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 30 Sep 2022

Sign in to comment.

More Answers (1)

John on 21 Jan 2023 at 11:14
I did something similar to what Walter mentioned, but I don't remember exactly.


Find more on Execution Speed 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!

Translated by