Magnitude and phase angle of complex signal—optimized for HDL code generation
The dsp.HDLComplexToMagnitudeAngle
System object™ computes the magnitude and phase angle of a complex signal. It provides
hardware-friendly control signals. The System object uses a pipelined coordinate rotation digital computer (CORDIC) algorithm to
achieve an HDL-optimized implementation.
To compute the magnitude and phase angle of a complex signal:
Create the dsp.HDLComplexToMagnitudeAngle
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
returns a HCMA
= dsp.HDLComplexToMagnitudeAngledsp.HDLComplexToMagnitudeAngle
System object, HCMA
, that computes the magnitude and phase angle of a
complex input signal.
sets properties of HCMA
= dsp.HDLComplexToMagnitudeAngle(Name,Value
)HCMA
using one or more name-value pairs. Enclose
each property name in single quotes.
cma =
dsp.HDLComplexToMagnitudeAngle('AngleFormat','Radians')
[
returns only the component magnitudes of mag
,validOut
]
= HCMA(X
,validIn
)X
.
To use this syntax, set OutputValue to
'Magnitude'
.
HCMA =
dsp.HDLComplextoMagnitudeAngle('OutputValue','Magnitude');
[
returns only the component phase angles of angle
,validOut
]
= HCMA(X
,validIn
)X
.
To use this syntax, set OutputValue to
'Angle'
.
HCMA =
dsp.HDLComplextoMagnitudeAngle('OutputValue','Angle');
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
angle
| cordicabs
(Fixed-Point Designer) | cordicangle
(Fixed-Point Designer) | cordiccart2pol
(Fixed-Point Designer)