pol2rect Array Operations: complex numbers pol2rect pol2rect Polar to rectangular format conversion. Description Converts an input array in magnitude-phase format to real-imaginary format. Syntax kout[] pol2rect kin[] kout[] pol2rect kmags[], kphs[] Performance kout[] -- 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 Also Vectorial opcodes, array opcodes Credits Author: &namevictor; NUI Maynooth 2014 New in version 6.04