Documentation

Width

Output width of input vector

Library

Signal Attributes

Description

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.

Parameters

    Note   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.

Characteristics

Data Types

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

Sample Time

Constant

Multidimensional Signals

Yes

Variable-Size Signals

Yes

Zero-Crossing Detection

No

Code Generation

Yes

Introduced before R2006a

Was this topic helpful?