%% Update Experiment with Estimated Parameter Value
% Specify an experiment.

experiment = sdo.Experiment('sdoRCCircuit');

% Typically, you also specify measured input/output data for the experiment.
%
% Specify a model parameter for estimation.

load_system('sdoRCCircuit');
C1_parameter = sdo.getParameterFromModel('sdoRCCircuit','C1');
C1_parameter.Value = 460e-6;
experiment.Parameters = C1_parameter;

% C1_parameter is the capacitance parameter of the C1 block. The initial guess for its value is 460 \mu F.
%
% Estimate the parameter value.
% Typically, you use sdo.optimize to get the estimated parameter values for an experiment. For this example, directly change the value of the capacitance parameter.

C1_parameter.Value = 1e-6;

%
% Update the experiment with the estimated parameter.

experiment = setEstimatedValues(experiment,C1_parameter);

% Use experiment.Parameters.Value to verify that the capacitance parameter's value is updated.
% Copyright 2015 The MathWorks, Inc.