Allowed unit systems
Option to specify supported unit systems for model
Model Configuration Pane: Diagnostics
Description
Use this parameter to limit the unit systems supported for the model. For example, when you
specify this parameter value as SI
, only SI units are allowed in the
model. By default, all unit systems are allowed.
You can specify the allowed unit systems by typing into the text box or using the Set Allowed Unit Systems dialog box. To open the Set Allowed Unit Systems dialog box, click Set Allowed Unit Systems.
To allow all unit systems, select Allow all unit systems.
To specify which unit systems to allow, clear Allow all unit systems. Then, select the name of a unit system and click Allow or Disallow to move that unit system between the allowed and disallowed unit systems lists. When you specify a unit from a disallowed unit system, the software returns a warning.
When you finish specifying the unit systems, click OK. The software populates the Allowed unit systems box in the Configuration Parameters dialog box with the unit systems from the Allowed unit systems list.
To limit unit systems at a subsystem level, see the Unit System Configuration block.
When registering custom unit databases, they appear in the list as new unit systems. For more information on custom unit databases, see Working with Custom Unit Databases.
Settings
all
(default) | comma-separated list of unit systemsall
Allow use of units from all unit systems in model.
- comma-separated list of unit systems
To limit the unit systems from which the model can use units, specify the parameter value as a comma-separated list of one or more of these unit system names:
SI
— International system of unitsSI (extended)
— Extended international system of unitsEnglish
— English system of unitsCGS
— Centimeter-gram-second system of units
Recommended Settings
The table summarizes recommended values for this parameter based on considerations related to code generation.
Application | Setting |
---|---|
Debugging | No recommendation |
Traceability | No recommendation |
Efficiency | No recommendation |
Safety precaution | No recommendation |
Programmatic Use
Parameter: AllowedUnitSystems |
Type: string | character vector |
Values:
all | comma-separated list that contains one or more of these
unit system names: SI , SI (extended) ,
English , CGS |
Default: 'all' |
Version History
Introduced in R2016a