% Copy referenced model to temporary folder.
pathToLib = scdpathdep_setup;
% Add folder to search path.
addpath(pathToLib);
% Open Simulink model.
mdl = 'scdpathdep';
open_system(mdl);
% Get model dependency paths.
dirs = frest.findDepend(mdl)
% The resulting path is on a local drive, C:/.
% Replace C:/ with valid network path accessible to remote workers.
dirs = regexprep(dirs,'C:/','\\hostname\C$\')
% Enable parallel computing and specify the model path dependencies.
options = frestimateOptions('UseParallel','on','ParallelPathDependencies',dirs)
Alternatives
You can enable parallel computing for all models with no path dependencies. To do so,
select the Use the parallel pool when you use the "frestimate" command check box
in the MATLAB preferences. When you select this check box and use the frestimate
command, you do not need to provide a frequency response options object.
If your model has path dependencies, you must create your own frequency response
options object that specifies the path dependencies. Use the
ParallelPathDependencies option before beginning the estimation.
See Also
frest.findSources | frestimate
Introduced in R2010a
frestimateOptions