CCONV
Contents
CCONV - real/complex spectrum conversions
The format of the input X and the desired format of the output Y are defined by the two inputs XTYPE and YTYPE. The input C is used as factor or dB offset. All combinations of input and output types are possible. If a real spectrum (Power, Linear, Logarithmic) is converted to a complex spectrum, the imaginary part is always set to zero for all components. If the input is a complex spectrum and the output is a real spectrum, the output vector length is the half of the input vector length (and vice versa). If the input is a single number, the output is a vector with two entries (if YTYPE = 0
) or a single number. If XTYPE is set to COMPLEX
the input C can also be a vector. In this case X is the real and C the imaginary data. If XTYPE is COMPLEX
and C is a number then X is interpreted as alternating real and imaginary data.
Usage:
CCONV X C XTYPE YTYPE
Inputs:
- X
- The input data (spectrum).
- C
- A factor or vector.
- XTYPE
- The type of input spectrum. The following values are supported:
COMPLEX
|0
- the input is a complex spectrum (re/im value pairs).
POWER
|1
- the input is a power spectrum.
LINEAR
|2
- the input is a linear magnitude spectrum.
LOGARITHMIC
|3
- the input is a logarithmic spectrum (dB).
- YTYPE
- The type of output spectrum. See XTYPE for details.
Outputs:
- Y
- The output data (converted spectrum).