## complex conjugate transpose matlab to C?

@user438431: If you want Power_X scaled correctly but do not need the FFT data scaled, then you can remove the division by fftSize from cX = / fftSize (where it divides each element of the vector) to Power_X = (cX*cX')/(50*(fftSize*fftSize)) (where it is one multiplication [to square fftSize, since Power_X is the square of energy] and one division on a scalar value), saving fftSize-2 operations.

I am not familiar with Matlab syntax, but, if Stuarts answer is correct that cX*cX' is computing the sum of the squares of the magnitudes of the values in the array, then I do not see the point of performing the FFT. You should be able to calculate the total energy in the same way directly from iData; the transform is just a coordinate transform that does not change energy, except for the scaling described above.

Ideally a Discrete Fourier Transform (DFT) is purely a rotation, in that it returns the same vector in a different coordinate system (i.e., it describes the same signal in terms of frequencies instead of in terms of sound volumes at sampling times). However, the way the DFT is usually implemented as a Fast Fourier Transform (FFT), the values are added together in various ways that require multiplying by 1/N to keep the scale unchanged.

Often, these multiplications are omitted from the FFT to save computing time and because many applications are unconcerned with scale changes. The resulting FFT data still contains the desired data and relationships regardless of scale, so omitting the multiplications does not cause any problems. Additionally, the correcting multiplications can sometimes be combined with other operations in an application, so there is no point in performing them separately. (E.g., if an application performs an FFT, does some manipulations, and performs an inverse FFT, then the combined multiplications can be performed once during the process instead of once in the FFT and once in the inverse FFT.)

we do the fft for other calculations that we need.

## Discussion