Convert magnitude and/or a phase angle signal to complex signal
Simulink / Math Operations
The MagnitudeAngle to Complex block converts magnitude and phase angle inputs to a complex output. The angle input must be in rad.
The block supports the following combinations of input dimensions when there are two block inputs:
Two inputs of equal dimensions
One scalar input and the other an ndimensional array
If the block input is an array, the output is an array of complex signals. The elements of a magnitude input vector map to the magnitudes of the corresponding complex output elements. Similarly, the elements of an angle input vector map to the angles of the corresponding complex output elements. If one input is a scalar, it maps to the corresponding component (magnitude or angle) of all the complex output signals.
If you use the CORDIC approximation method (see Definitions), the block input for phase angle has the following restrictions:
For signed fixedpoint types, the input angle must fall within the range [–2π, 2π) rad.
For unsigned fixedpoint types, the input angle must fall within the range [0, 2π) rad.
The following table summarizes what happens for an outofrange input:
Block Usage  Effect of OutofRange Input 

Simulation  An error appears. 
Generated code  Undefined behavior occurs. 
Accelerator modes 
Ensure that you use an inrange input for the MagnitudeAngle to Complex block when you use the CORDIC approximation. Avoid relying on undefined behavior for generated code or accelerator modes.
Data Types 

Direct Feedthrough 

Multidimensional Signals 

VariableSize Signals 

ZeroCrossing Detection 

[1] Volder, JE. “The CORDIC Trigonometric Computing Technique.” IRE Transactions on Electronic Computers EC8 (1959); 330–334.
[2] Andraka, R. “A survey of CORDIC algorithm for FPGA based computers.” Proceedings of the 1998 ACM/SIGDA sixth international symposium on Field programmable gate arrays. Feb. 22–24 (1998): 191–200.
[3] Walther, J.S. “A Unified Algorithm for Elementary Functions.” HewlettPackard Company, Palo Alto. Spring Joint Computer Conference (1971): 379–386. (from the collection of the Computer History Museum). www.computer.org/csdl/proceedings/afips/1971/5077/00/50770379.pdf
[4] Schelin, Charles W. “Calculator Function Approximation.” The American Mathematical Monthly 90, no. 5 (1983): 317–325.