This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Complex to Magnitude-Angle

Compute magnitude and/or phase angle of complex signal

  • Library:
  • Simulink / Math Operations


The Complex to Magnitude-Angle block outputs the magnitude and/or phase angle of the input signal, depending on the setting of the Output parameter. The outputs are real values of the same data type as the block input. The input can be an array of complex signals, in which case the output signals are also arrays. The magnitude signal array contains the magnitudes of the corresponding complex input elements. The angle output similarly contains the angles of the input elements.



expand all

Complex input signal that the block computes and outputs the magnitude and/or the phase angle.

Data Types: single | double


expand all

Output signal that is the magnitude and/or phase angle of the input signal. To choose the output, set the Output parameter.

Data Types: single | double


expand all

Specify if the output is the magnitude and/or the phase angle in radians of the input signal.

Command-Line Information

Parameter: Output
Type: character vector
Values: 'Magnitude and angle' | 'Magnitude' | 'Angle'
Default: 'Magnitude and angle'

Specify the sample time as a value other than -1. For more information, see Specify Sample Time.


This parameter is not visible unless it is explicitly set to a value other than -1. To learn more, see Blocks for Which Sample Time Is Not Recommended.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar
Default: '-1'

Block Characteristics

Data Types

double | single

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a