Main Content


Namespace: frest

List of model path dependencies


dirs = frest.findDepend(model)


dirs = frest.findDepend(model) returns paths containing Simulink® model dependencies required for frequency response estimation using parallel computing. model is the Simulink model to estimate, specified as a character vector or a string. dirs is a cell array, where each element is a path character vector. dirs is empty when frest.findDepend does not detect any model dependencies. Append paths to dirs when the list of paths is empty or incomplete.

frest.findDepend does not return a complete list of model dependency paths when the dependencies are undetectable.


collapse all

To demonstrate a dependency on a file that is not in the current working folder, move the model files to a temporary folder and return the path to that folder. The pathdepSetup helper function also adds the temporary folder to the MATLAB® search path.

tempPath = pathdepSetup;

Open the Simulink® model.

mdl = 'scdpathdep';

Obtain the model dependency path.

dirs = frest.findDepend(mdl)
dirs = 1×1 cell array

The resulting path is on the local drive C:/.

If you are using remote workers, specify that all workers can access your local drive. For example, this command converts all references to the C drive to an equivalent network address that is accessible to remote workers.

dirs = regexprep(dirs,'C:/','\\\\hostname\\C$\\')

Enable parallel computing and specify the model path dependencies.

options = frestimateOptions(...

You can now use these options for frequency response estimation using parallel computing.

io = getlinio(mdl);
in = frest.Sinestream('SimulationOrder','OneAtATime');
frd = frestimate(mdl,io,in,options);

After estimating the frequency response, you can close the model.


Return the model files to the current working folder and remove the temporary folder from the path.


Version History

Introduced in R2010a