Main Content

Units in Simulink

R2026b
Unit specification and unit conversion functions for Simulink® signals

Simulink enables you to specify physical units as attributes on signals at the boundaries of model components. By specifying, controlling, and visualizing signal units, you can ensure the consistency of calculations across the various components of your model. For example, this added degree of consistency checking might be useful if you are integrating many separately developed components into a large, overall system model. To get started with units, see Unit Specification in Simulink Models.

Blocks

Inport blockInportCreate input port for subsystem or external input
Outport blockOutportCreate output port for subsystem or external output
Signal Specification blockSignal SpecificationSpecify desired dimensions, sample time, data type, numeric type, and other attributes of signal
Unit System Configuration blockUnit System ConfigurationRestrict units to specified allowed unit systems
Unit Conversion blockUnit ConversionConvert units

Functions

createCustomDBFromExcelCreate custom units database file from Microsoft Excel spreadsheet
rehashUnitDBsRefresh unit database files on MATLAB path
showunitslistShow built-in units, physical quantities, and unit systems supported by Simulink

Topics

Troubleshooting

Troubleshooting Units

Use Model Advisor checks to troubleshoot common issues with unit settings.

Related Information