Version Info

Minimum Origin Version Required: Origin 8 SR0

Convert from Hermitian form to general complex

After compute the FFT, you will get result data in hermitian form, the following example will show you how to convert it to general complex and then get the complex conjugate of this data.

#include <Origin.h>
#include <..\Originlab\fft.h>
void fft_complex_conjugate(vector& vy)
    int nSize = vy.GetSize();
    // Perform forward FFT with exact size of signal   
    vector vReal;
    vReal = vy;
    fft_fft_real(nSize, vReal);
    // Convert the result to general complex
    vector<complex> vComplex(nSize);
    fft_hermitian_to_complex(nSize, vReal, vComplex);
    // Replace vector with the conjugate of the vector.
    // Output
    printf("Conjugate vector:\n");
    for( int ii = 0; ii < vComplex.GetSize(); ii++)
        printf(" %g + %gi\n", vComplex[ii].m_re, vComplex[ii].m_im);

void fft_complex_conjugate_ex1()
	vector vy = {1, 2, 3, 4, 5};