Announcement

Collapse
No announcement yet.

Math help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Math help

    I'm playing a bit with Discreet Fourier Transform, but I'm already stuck. Problem is that I've never learn how to deal with imaginary numbers...


    Now, for the infos I've found the DFT for
    s={x_1, x_2, ... x_N}

    is
    S={y_1, y_2, ... y_N}


    with:
    N
    y_k = sum x_h*exp(-i*2*pi*(k-1)*(h-1)/N), 1<= k <= N
    h=1


    Now, porting the above expression to code is pretty simple. Only, I'm stuck on that damned -i !

    I mean, if
    x_1 = 10337497
    and
    N = 196608

    going for y_2, at the first iteration is:
    10337497 * exp(-i*2*pi*(2-1)*(1-1)/196608)

    How can I solve it?
    Sat on a pile of deads, I enjoy my oysters.

  • #2
    (I've gone for the wrong forum, can someone move this to the lounge? This problem is neither a hardware nor a software one)
    Sat on a pile of deads, I enjoy my oysters.

    Comment


    • #3
      LOL, sure it does!

      Its scieitific calculations that can hardly be solved with today's computers. Therefore we need faster hardware

      edit: sorry dunno how to do that. (still in hs hahaha, shame on me)
      Last edited by Chrono_Wanderer; 21 October 2003, 20:29.

      Comment


      • #4
        FFT or Euler identities may help

        Fast Fourier Transforms are available for many software packages...those work well. If this isn't what your after, it is unlikely you'll be able to get an entirely real solution. Some identities that are often useful when dealing with imaginary numbers are the Euler Identities.
        exp(i*x)=cos(x)+i*sin(x)
        exp(-i*x)=cos(x)-i*sin(x)
        also:
        cos(x)=(exp(i*x)+exp(-i*x))/2
        sin(x)=(exp(i*x)-exp(-i*x))/(2*i)
        Just a month left of grad school!

        Comment


        • #5
          I was just going to say that. No, really!
          Join MURCs Distributed Computing effort for Rosetta@Home and help fight Alzheimers, Cancer, Mad Cow disease and rising oil prices.
          [...]the pervading principle and abiding test of good breeding is the requirement of a substantial and patent waste of time. - Veblen

          Comment


          • #6
            These can also be useful:

            sinh(ix) = isin(x)
            cosh(ix) = cos(x)

            Use Matlab!

            Jonathan
            I hate flankers...

            Comment

            Working...
            X