Reverse signal or spectrum.
Y = fftflip(X)
fftflip implements a type of flip operation, in which the first element of the array remains unchanged and the rest reverse their order. Given an even length array indexed by 1:n, the result is indexed 1 n n-1 ... 2. An odd length array is dealt with in the same way. Expressed in terms of frequency coefficients of an FFT, the DC term stays put, the Nyquist term stays put (even length only), and the positive and negative frequency terms swap places.
If the input is a matrix, this function operates on the columns.
The function will work on any type of array, including double, so it may be used on complex arrays.