none
Complex all 0s

    Question

  • I am running this cold

                int N2 = 16 - 1;
                for (int F3 = 0; F3 <= 4; F3++)
                {
                    for (int K = 0; K <= N2; K++)
                    {
                        F[F3] = F[F3] + (Complex)DSP2.ElementAt(K) * Complex.Exp((-Complex.ImaginaryOne * Math.PI * 2D * F3) / 16D);
                    }
                   }

    and I am getting this :

    this is DSP2:

    0
    7.07106781186547
    10
    7.07106781186548
    1.22460635382238E-15
    -7.07106781186547
    -10
    -7.07106781186548
    -2.44921270764475E-15
    7.07106781186547
    10
    7.07106781186548
    3.67381906146713E-15
    -7.07106781186548
    -10
    -7.07106781186548
    -4.89842541528951E-15

    This is F[]

    F[0] = (-8.88178419700125E-15, 0) // this one should  be a real number!!!
    F[1] = (-7.105427357601E-15, 2.66453525910038E-15)
    F[2] = (-3.5527136788005E-15, 5.32907051820075E-15)
    F[3] = (-8.88178419700125E-16, 7.105427357601E-15)
    F[4] = (-7.39557098644699E-31, 8.88178419700125E-15)

    now I am getting all 0 or number very close to 0

    why?

    Saturday, August 24, 2013 3:33 PM

Answers

All replies