Documentation Center

  • Trial Software
  • Product Updates

getValuesToEstimate

Class: sdo.Experiment
Package: sdo

Get model initial states and parameters for estimation from experiment

Syntax

parameters = getValuesToEstimate(experiment)

Description

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.

Input Arguments

experiment

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

parameters

Model 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, getValuesToEstimate tags each entry of parameters to track its corresponding experiment. To update the experiments with their corresponding estimated parameter values, use setEstimatedValues.

Examples

expand all

Get Model Initial States and Parameters to Estimate from Experiment

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

open_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_0'
      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
 
lists of methods, superclasses

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(2,1), the capacitance of the C1 block, is the model parameter specified by experiment for estimation.

See Also

|

Was this topic helpful?