Output width of input vector


Signal Attributes


The Width block generates as output the width of its input vector.

You can use an array of buses as an input signal to a Width block. For details about defining and using an array of buses, see Combine Buses into an Array of Buses.

Data Type Support

The Width block accepts real or complex signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

  • Boolean

  • Enumerated

The Width block also supports mixed-type signal vectors.

When the Output data type mode is not Choose intrinsic data type, the block supports only built-in numeric types. For more information, see Data Types Supported by Simulink in the Simulink® documentation.



The Width block ignores the Data type override setting of the Fixed-Point Tool.

Output data type mode

Specify the output data type to be the same as the input, or inherit the data type by back propagation. You can also choose to specify a built-in data type from the drop-down list in the Output data type parameter.

Output data type

This parameter is visible when you select Choose intrinsic data type for Output data type mode. Select a built-in data type from the drop-down list.


Data Types

Double | Single | Boolean | Base Integer | Fixed-Point | Enumerated | Bus

Sample Time


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Code Generation


Introduced before R2006a

Was this topic helpful?