Main Content

getValuesToEstimate

Get model initial states and parameters for estimation from experiment

Description

example

parameters = getValuesToEstimate(experiment) returns the model initial states and parameters of an experiment that you want to estimate.

When you estimate parameters for multiple experiments, getValuesToEstimate tags each parameter to track its corresponding experiment. To update the experiments with their corresponding estimated parameter values, use setEstimatedValues.

Examples

collapse all

Specify an experiment with a model initial state and parameter that you want to estimate.

load_system('sdoRCCircuit');
experiment = sdo.Experiment('sdoRCCircuit');
experiment.InitialStates = sdo.getStateFromModel('sdoRCCircuit','C1');
experiment.Parameters = sdo.getParameterFromModel('sdoRCCircuit','C1');

Get the model initial states and parameters that you want to estimate from the experiment.

val = getValuesToEstimate(experiment)
 
val(1,1) =
 
       Name: 'sdoRCCircuit/C1:sdoRCCircuit.C1.vc'
      Value: 0
    Minimum: -Inf
    Maximum: Inf
       Free: 1
      Scale: 1
    dxValue: 0
     dxFree: 1
       Info: [1x1 struct]

 
val(2,1) =
 
       Name: 'C1'
      Value: 1.0000e-03
    Minimum: -Inf
    Maximum: Inf
       Free: 1
      Scale: 0.0020
       Info: [1x1 struct]

 
2x1 param.Continuous
 

val(1,1), the initial voltage of the model capacitor block, C1, is the initial state specified by experiment for estimation. Execute class(val(1,1)) to see that val(1,1) is a param.State object, representing a model initial state.

val(1,2), the capacitance of the C1 block, is the model parameter specified by experiment for estimation.

Input Arguments

collapse all

Experiment, specified as an sdo.Experiment object.

To get the model initial states and parameters for multiple experiments, use a vector of sdo.Experiment objects.

To specify that you want to estimate the value of a model initial state or parameter for an experiment, set its Free property to true. For example, experiment.InitialStates(1).Free = true.

Output Arguments

collapse all

Initial states and parameters of an experiment that you want to estimate, returned as a vector of param.Continuous objects.

When experiment specifies multiple experiments, the getValuesToEstimate function tags each entry of parameters to track its corresponding experiment. To update the experiments with their corresponding estimated parameter values, use setEstimatedValues.

Version History

Introduced in R2012b