Main Content


Options for frequency response estimation


options = frestimateOptions
options = frestimateOptions('OptionName',OptionValue)


options = frestimateOptions creates a frequency response estimation options object, options, with default settings. Pass this object to the function frestimate to use these options for frequency response estimation.

options = frestimateOptions('OptionName',OptionValue) creates a frequency response estimation options object options using the options specified by comma-separated name/value pairs.

Input Arguments


Estimation options, specified as comma-separated option name and option value pairs.

Option NameOption Value

Block paths of time-varying source blocks to hold constant during frequency response estimation, specified as an array of Simulink.BlockPath objects. To identify time-varying source blocks that can interfere with frequency response estimation, use frest.findSources.

Default: empty


Set to 'on' to enable parallel computing for estimations with the frestimate command.

Default: 'off'


A cell array of character vectors or string array that specifies the path dependencies required to execute the model to estimate. All the workers in the parallel pool must have access to the folders listed in 'ParallelPathDependencies'.

Default: empty


Identify and disable time-varying source blocks for frequency response estimation.

% Open Simulink model.
mdl = 'scdspeed_ctrlloop';

% Convert referenced subsystem to normal mode.
set_param('scdspeed_ctrlloop/Engine Model','SimulationMode','Normal');

% Get I/O points and create sinestream.
io = getlinio(mdl)
in = frest.Sinestream('Frequency',logspace(1,2,10),'NumPeriods',30,...

% Identify time-varying source blocks.
srcblks = frest.findSources(mdl)

% Create options set specifying blocks to hold constant
opts = frestimateOptions
opts.BlocksToHoldConstant = srcblks

% Run frestimate 
[sysest,simout] = frestimate(mdl,io,in,opts)

Enable parallel computing and specify the model path dependencies.

% Copy referenced model to temporary folder.
pathToLib = scdpathdep_setup;   

% Add folder to search path.

% Open Simulink model.
mdl = 'scdpathdep';

% 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)


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.

Introduced in R2010a