Main Content

getNumberScenarios

Return number of scenarios from SimBiology.Scenarios object

Since R2019b

Description

example

numScenarios = getNumberScenarios(sObj) returns the number of scenarios from the SimBiology.Scenarios object sObj.

Examples

collapse all

Create a SimBiology.Scenarios object for a parameter (k1) with sample values of 1.3 and 1.4.

sObj = SimBiology.Scenarios('k1',[1.3;1.4]);

Add a species (s1) with initial sample amounts of 2.7, 3.1, and 3.4. Use the cartesian combination method to combine entries.

add(sObj,'cartesian','s1',[2.7; 3.1; 3.4]);

Get the number of simulation sceanarios that the object has after combining the entries.

n = getNumberScenarios(sObj)
n = 6

Input Arguments

collapse all

Simulation scenarios, specified as a SimBiology.Scenarios object.

Output Arguments

collapse all

Total number of scenarios, returned as a nonnegative integer.

Version History

Introduced in R2019b