addProperty

Add a property to a stereotype

Description

property = addProperty(stereotype,name,Name,Value) adds a new property with the specified Name,Value attributes.

Examples

collapse all

Add a component stereotype and add a VoltageRating property with value 5.

stype = addStereotype(profile,'electricalComponent','AppliesTo','Component')
property = addProperty(stype,'VoltageRating','DefaultValue','5');

Input Arguments

collapse all

Name of the property must be unique within the stereotype.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Datatype', 'double'

Data Types: char

Data Types: char

Data Types: double

Data Types: double

Data Types: char

Data Types: double

Output Arguments

collapse all

Introduced in R2019a