Engee documentation

Real-Imag to Complex

Converts a real and/or imaginary input signal into a complex output signal.

real imag to complex

Description

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

Both inputs of the block can be arrays (vectors or matrices) of the same dimension, or one input can be an array and the other a scalar. The output signal will have the dimensions resulting from the broadcast mechanism - Julia will automatically expand the dimensionality of the smaller data array to the dimensionality of the larger one to inherit the dimensionality correctly.

The elements of the real (actual) input are mapped to the real parts of the corresponding elements of the complex output. An imaginary input is similarly mapped to the imaginary parts of the complex outputs. If one of the inputs is a scalar, it is mapped to the corresponding component (real or imaginary) of all complex output signals.

Ports

Input

Re - the real part of the input signal
scalar | vector | matrix | array

A real value to be converted into a complex output signal specified as a scalar, vector or matrix.

  • Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Im - imaginary part of the input signal
scalar | vector | matrix | array

An imaginary quantity to be converted into a complex output signal, given as a scalar, vector or matrix.

  • Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Port_1 - input signal
scalar | vector | matrix | array

A real or imaginary value to be converted into a complex output signal, specified as a finite scalar, vector or matrix.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - complex output signal
scalar | vector | matrix

Output complex signal formed from real and imaginary input quantities.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Parameters

Input - input type: real and/or imaginary part
Real (by default) | Imag | Real and imag

Specify the type of input: real input, imaginary input or both.

Usage in program code

Block parameter

Input

Type

character string

Values

Real and imag | Real | Imag

By default

Real and imag

Imag part - imaginary part of complex output.
0 (By default) | terminal scalar | vector | matrix | array

Specify the imaginary value to be used when converting an input signal to a complex output signal.

Dependencies

To enable this parameter, set the Input parameter to Real.

Usage in program code

Block parameter

ImagPart

Type

character vector

Values

mpty value

* By default*

0

Real part - real part of complex output
0 (by default) | terminal scalar | vector | matrix | array

Specify the imaginary value to be used when converting an input signal to a complex output signal.

Dependencies

To enable this parameter, set the Input parameter to Imag.

Usage in program code

Block parameter

RealPart

Type

character vector

Values

terminal real scalar | vector | matrix

By default

0

Sample time (-1 for inherited) - interval between samples
-1 (by default) | scalar | vector

Specify the time interval between samples.

To inherit the sampling time, set this parameter to -1.

Dependencies

This parameter is only visible if you set it to a value other than -1.

Usage in program code

Block parameter

SampleTime

Type

string scalar | character vector

By default

-1