Advisor.authoring.PositiveModelParameterConstraint Class
Namespace: Advisor.authoring
Superclasses:
Create a Model Advisor constraint to check for supported model parameter values
Description
Instances of Advisor.authoring.PositiveModelParameterConstraint
class define supported values for specified model parameters.
Construction
constraint = Advisor.authoring.PositiveModelParameterConstraint()
creates an instance of this class.
Properties
Examples
Specify Supported Model Parameter Values
These commands specify that the SolverType
model parameter must have a value of Variable-step
:
c1=Advisor.authoring.PositiveModelParameterConstraint; c1.ID='ID_1'; c1.ParameterName='SolverType'; c1.SupportedParameterValues={'Variable-step'};
These commands specify that the StopTime
model parameter must have a value of 10
or
15
:
c1=Advisor.authoring.PositiveModelParameterConstraint; c1.ID='ID_1'; c1.ParameterName='StopTime'; c1.SupportedParameterValues={'10','15'};
For the ReplacementTypes
model parameter
(Embedded Coder Users), these commands specify two sets of supported values for
the double
and single
data types:
c1 = Advisor.authoring.PositiveModelParameterConstraint(); c1.ID='ID_2'; c1.ParameterName = 'ReplacementTypes'; s1 = struct('double', 'a', 'single', 'b'); s2 = struct('double', 'c', 'single', 'b'); c1.SupportedParameterValues = {s1, s2};
Version History
Introduced in R2018a