Real-Imag to Complex

Convert real and/or imaginary inputs to complex signal


Math Operations


The Real-Imag to Complex block converts real and/or imaginary inputs to a complex-valued output signal.

The inputs can both be arrays (vectors or matrices) of equal dimensions, or one input can be an array and the other a scalar. If the block has an array input, the output is a complex array of the same dimensions. The elements of the real input map to the real parts of the corresponding complex output elements. The imaginary input similarly maps to the imaginary parts of the complex output signals. If one input is a scalar, it maps to the corresponding component (real or imaginary) of all the complex output signals.

Data Type Support

The block accepts input signals of the following data types:

  • Floating point

  • Built-in integer

  • Fixed point

Complex fixed-point signals must have trivial slope and zero bias. For more information about support for fixed-point data types, see Scaling in the Fixed-Point Designer™ documentation.

Parameters and Dialog Box


Specify the kind of input: a real input, an imaginary input, or both.

Real (Imag) part

This parameter appears only when you set Input to Real or Imag. If the input is a real-part signal, this parameter specifies the constant imaginary part of the output signal. If the input is the imaginary part, this parameter specifies the constant real part of the output signal. The title of this parameter changes to reflect its usage.

Sample time


Data Types

Double | Single| Base Integer | Fixed-Point

Sample Time

Inherited from driving block

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Code Generation


Introduced before R2006a

Was this topic helpful?