ComplexToPolar

This block converts a complex input into a magnitude and angle in radians, or, given the magnitude and the angle, the block produces a complex output.

    ComplexToPolar

Library

SignalConversions

Description

The ComplexToPolar block works in two ways. Given a complex matrix, the block computes its polar representation in which the magnitude and the angle are the two real outputs. Conversely, the block creates a complex matrix from a real matrix of magnitudes and a real matrix of angles. Conversely, the block creates a complex matrix from a real matrix of magnitudes and a real matrix of angles. The decomposition type parameter defines the behavior of the blocks.

Parameters

ComplexToPolar_0

NameLabelDescriptionData TypeValid Values

decomptyp

Conversion type

This parameter defines the decomposition type.

Structure

decomptyp/CtoP

Complex to polar

The block has a complex matrix as input and produces two real matrices as output.

Number

1
2

decomptyp/PtoC

Polar to complex

The block has two real matrices as input (magnitude and angle) and produces a complex matrix as output.

Number

1
2

externalActivation

External activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

decomptyp.CtoP

Port 2

explicit

input

decomptyp.PtoC

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no