MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Strange behaviour of Fourier[] in Mathematica 7

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93980] Re: Strange behaviour of Fourier[] in Mathematica 7
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Sun, 30 Nov 2008 07:00:47 -0500 (EST)
  • References: <ggr257$e5r$1@smc.vnet.net>
  • Reply-to: "Nasser Abbasi" <nma at 12000.org>

"Guy Lamouche" <noemail at noemail.com> wrote in message 
news:ggr257$e5r$1 at smc.vnet.net...
>I came across the following strange behaviour in Mathematica 7 on my 
>system.
>
> Here is some data generated in an intermediate calculation:
>
> data = {-0.00023798861821554878` + 0.` I,
>  0.0006139487084761968` -
>   0.001435108611558083` I, -0.001710424871758314` +
>   0.0069296921181465935` I,
>  0.0019942263545704086` - 0.021565769535630507` I,
>  0.002517554651534451` +
>   0.04381651818448262` I, -0.01220847735732839` -
>   0.05813547502399065` I,
>  0.018746602690952168` +
>   0.050324001393803136` I, -0.01572173179907872` -
>   0.028359695723765642` I,
>  0.007974058406218107` +
>   0.010364643233016675` I, -0.0025342667815659334` -
>   0.0024424248976939247` I, 0.`, 0.`, 0.`, 0.`, 0.`, 0.`, 0.`, 0.`,
>  0.`, 0.`, 0.`}
>
> If I compute the discrete Fourier transform by applying directly the 
> formula
> used by Mathematica (as described in the documentation for Fourier), I get 
> a
> nice transform with real and imaginary parts (the following is not 
> intended
> to be read, but pasted in Mathematica front-end):
>
> n = Length[data];
> u[s_] = 1/Sqrt[n] \!\(
> \*UnderoverscriptBox[\(\[Sum]\), \(r =
>      1\), \(n\)]\(data[\([\)\(r\)\(]\)]\ Exp[
>      I\ 2.  \[Pi] \((r - 1)\) \((s - 1)\)/n]\)\);
> dataTF1 = Table[u[i], {i, 1, n}];
> ListPlot[{dataTF1 // Re, dataTF1 // Im}, PlotRange -> All,
> PlotStyle -> {Blue, Red}]
>
> If I use Fourier[], the imaginary part is put to zero!!!
>
> dataTF2 = Fourier[data];
> ListPlot[{dataTF2 // Re, dataTF2 // Im}, PlotRange -> All,
> PlotStyle -> {Blue, Red}]
>
> This behaviour occurs on my system only for some data like the one above,
> but it does occur. There is no problem with 6.0.3 on another computer 
> since
> the result is the same for both calculations above.
>
> I would like to know if this happens also on other's computer with
> Mathematica 7? I am using the windows version ("7.0 for Microsoft Windows
> (32-bit) (November 10, 2008)") under Vista Business SP1.
>
> Thanks in advance.
>
> Guy Lamouche
>
>

I get the same problem on my version 7 on windows XP SP2.

As far as I can see, this is clearly a bug that should be reported.

Nasser



  • Prev by Date: RE: Re: v.7.0 issues
  • Next by Date: Re: Strange behaviour of Fourier[] in Mathematica 7
  • Previous by thread: Strange behaviour of Fourier[] in Mathematica 7
  • Next by thread: Re: Strange behaviour of Fourier[] in Mathematica 7