Main Content

SensitivityAnalysisOptions

Specify sensitivity analysis options

Description

TheSensitivityAnalysisOptionsproperty is an object that holds the sensitivity analysis options in the configuration set object. Sensitivity analysis is supported only for deterministic (ODE) simulations.

Note

TheSensitivityAnalysisOptionsproperty controls the settings related to sensitivity analysis. To enable or disable sensitivity analysis, use theSensitivityAnalysisproperty.

Properties ofSensitivityAnalysisOptionsare summarized inProperty Summary.

When sensitivity analysis is enabled, the following command

[t,x,names] = sbiosimulate(modelObj)

returns[t,x,names], where

  • tis ann-by-1vector, wherenis the number of steps taken by the ode solver andtdefines the time steps of the solver.

  • xis ann-by-mmatrix, wherenis the number of steps taken by the ode solver andmis:

    Number of species and parameters specified in StatesToLog + (Number of sensitivity outputs * Number of sensitivity input factors)
    A SimBiology®state includes species and nonconstant parameters.

  • namesis the list of states logged and the list of sensitivities of the species specified inStatesToLogwith respect to the input factors.

For an example of the output, seeExamples.

You can add a number of configuration set objects with differentSensitivityAnalysisOptionsto the model object with theaddconfigsetmethod. Only one configuration set object in the model object can have theActiveproperty set totrueat any given time.

Property Summary

Inputs Specify species and parameter input factors for sensitivity analysis
Normalization 指定规范化type for sensitivity analysis
Outputs Specify species and parameter outputs for sensitivity analysis

Characteristics

Applies to 对象:配置设置
Data type Object
Data values SensitivityAnalysisOptionsproperties as summarized inProperty Summary.
Access Read-only

Examples

This example shows how to setSensitivityAnalysisOptions.

  1. Import the radio decay model from SimBiology demos.

    modelObj =sbmlimport('radiodecay');
  2. Retrieve the configuration settings and the sensitivity analysis options frommodelObj.

    configsetObj = getconfigset(modelObj); sensitivityObj = get(configsetObj,'SensitivityAnalysisOptions');
  3. Add a species and a parameter to theInputsproperty. Use thesbioselectfunction to retrieve the species and parameter objects from the model.

    speciesObj = sbioselect(modelObj,'Type','species','Name','z'); parameterObj = sbioselect(modelObj,'Type','parameter','Name','c'); set(sensitivityObj,'Inputs', [speciesObj parameterObj]);
  4. Add a species to theOutputsproperty and display.

    set(sensitivityObj,'Outputs', speciesObj); get(sensitivityObj,'Outputs')
    SimBiology Species Array Index: Compartment: Name: InitialAmount: InitialAmountUnits: 1 unnamed z 0 molecule
  5. EnableSensitivityAnalysis.

    set(configsetObj.SolverOptions,'SensitivityAnalysis', true); get(configsetObj.SolverOptions,'SensitivityAnalysis') ans = 1
  6. Simulate and return the results to three output variables. SeeDescriptionfor more information.

    [t,x,names] = sbiosimulate(modelObj);
  7. Display thenames.

    names
    names = 'x' 'z' 'd[z]/d[z]_0' 'd[z]/d[Reaction1.c]'

    Display state valuesx.

    x

    The display follows the column order shown innamesfor the values inx. The rows correspond tot.