Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

dft

Name: Anonymous 2009-09-20 14:22

is this a valid dft implementation ?

float px = 0.0f;
    float pw = 0.0f;
    float FC_indx = 0.0f;
    unsigned long indx = 0;
    float FC = _2PI * freq / SAMPLE_RATE;
    while (indx < data_len) {
        FC_indx = FC * indx;
        pw += data[indx] * fastcos(FC_indx);
        px += data[indx] * fastsin(FC_indx);
        indx++;
    }
    return sqrt(pw+px);

Name: Anonymous 2009-09-20 14:31

Please use the [code] tags. Thank you.

Name: Anonymous 2009-09-20 14:41

ok

Name: Anonymous 2009-09-20 14:58

No, as it doesn't actually compute the DFT of a signal. It could easily be modified to do so, though.
Even so, I suspect that what you are trying to do may be more efficiently accomplished with autocorrelation.

Name: Anonymous 2009-09-20 15:06

could u enlighten me about why it doesnt compute a dft ? and what autocorrelation is

Name: Anonymous 2010-12-23 17:52

Don't change these.
Name: Email:
Entire Thread Thread List