pol2rectArray Operations: complex numberspol2rectpol2rect
Polar to rectangular format conversion.
Description
Converts an input array in magnitude-phase format to real-imaginary format.
Syntaxkout[] pol2rect kin[]kout[] pol2rect kmags[], kphs[]Performancekout[] -- output array containing the complex-valued real-imaginary output. It will be created if it does not exist.
kin[] -- input array containing the complex-valued magnitude-phase input.
kmags[] -- input array containing the
real-valued magnitude input. This is expected to contain only
the non-negative spectrum (0 to Nyquist, inclusive).
kphs[] -- input array containing the
real-valued phase input. This is expected to contain only the
non-negative spectrum (0 to Nyquist, inclusive).
NB: the second version of the opcode with two inputs is designed
to produce a "packed" real FFT spectrum where the two positions in the
array contain the real parts of zero Hz and Nyquist
frequency. Therefore the output array length will be 2*L -
2, where L is the length of the input arrays (which should match).
Examples
Here is an example of the pol2rect opcode. It uses the file pol2rect.csd.Example of the pol2rect opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See AlsoVectorial opcodes,
array opcodes
CreditsAuthor: &namevictor;NUI Maynooth2014New in version 6.04