Unit Conversion

Convert units


Signal Attributes


The Unit Conversion block converts the unit of the input signal to the output signal. The block can convert if the units are separated by a scaling factor or offset, or are inverse units, for example:

  • y=a*U

  • y=a*U+b, where a is the scale and b is the offset

  • y=a/U

This block supports normal, accelerator, and rapid accelerator modes and fast restart.

Data Type Support

The Unit Conversion block accepts and outputs real or complex values of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

For more information, see Data Types Supported by Simulink.


Output data type

Specify the output data type.


Default: Inherit: Inherit via internal rule

Inherit: Inherit via internal rule

Simulink® chooses intermediate and output data types to balance numerical accuracy, performance, and generated code size, while taking into account the properties of the embedded target hardware. If you change the embedded target settings, the data type selected by the internal rule might change.

Inherit: Inherit via back propagation

Output data type is inherited via back propagation. Internal rules determine the intermediate data types and Simulink casts the final results to the output data type.

Command-Line Information

See Block-Specific Parameters for the command-line information.

See Also

See Converting Units for more information.


Data Types

Double | Single | Base Integer | Fixed-Point

Sample Time

Inherited from driving block

Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Code Generation


Introduced in R2016a

Was this topic helpful?