%% Create a Steady-State Operating Point Object
% For this example, consider a Simulink model 'PopulationModel' which models a simple ecology where an organism population growth is limited by the carrying capacity of the environment.
% Set up your requirement or experiment, and then define a steady-state operating point object OpPointSetup. The operating point specification object is created using operspec. Use sdo.OperatingPointSetup to create the operating point object.

opSpec = operspec('PopulationModel');
inputsToUse = [];
statesToUse = 1;
OpPointSetup = sdo.OperatingPointSetup(opSpec,inputsToUse,statesToUse)

% Pass the operating point object OpPointSetup to your objective function, and include OpPointSetup in the call function to the sim method of the sdo.SimulationTest object. The sim method computes a steady-state operating point and applies it to the model.  Specifically, it applies the operating point inputs specified in UseOperatingPointInputs, and applies the operating point states specified in UseOperatingPointStates. Then perform estimation or optimization per your requirement.
% Copyright 2012 The MathWorks, Inc.