# Complex to Real-Imag

Output real and imaginary parts of complex input signal

Libraries:
Simulink / Math Operations
HDL Coder / Math Operations

## Description

The Complex to Real-Imag block outputs the real and/or imaginary part of the input signal, depending on the setting of the Output parameter. The real outputs are of the same data type as the complex input. The input can be an array (vector or matrix) of complex signals, in which case the output signals are arrays of the same dimensions. The real array contains the real parts of the corresponding complex input elements. The imaginary output similarly contains the imaginary parts of the input elements.

## Ports

### Input

expand all

Complex input signal that the block computes and outputs the real and/or imaginary part.

Data Types: `single` | `double` | `int8` | `int16` | `int32` | `int64` | `uint8` | `uint16` | `uint32` | `uint64` | `Boolean` | `fixed point`

### Output

expand all

Output signal that is the real and/or imaginary part of the input signal. To choose which part is output, set the Output parameter.

Data Types: `single` | `double` | `int8` | `int16` | `int32` | `int64` | `uint8` | `uint16` | `uint32` | `uint64` | `Boolean` | `fixed point`

## Parameters

expand all

Specify whether the output is the real, imaginary, or both real and imaginary part of the input signal.

#### Programmatic Use

 Parameter: `Output` Type: string | character vector Values: `'Real and imag'` | `'Real'` | `'Imag'` Default: `'Real and imag'`

Specify the time interval between samples. To inherit the sample time, set this parameter to `-1`. For more information, see Specify Sample Time.

#### Dependencies

This parameter is visible only if you set it to a value other than `-1`. To learn more, see Blocks for Which Sample Time Is Not Recommended.

#### Programmatic Use

 Block Parameter: `SampleTime` Type: string scalar or character vector Default: `"-1"`

## Block Characteristics

 Data Types `Boolean` | `double` | `fixed point` | `integer` | `single` Direct Feedthrough `yes` Multidimensional Signals `yes` Variable-Size Signals `yes` Zero-Crossing Detection `no`

## Version History

Introduced before R2006a