MathGroup Archive 2008

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

Search the Archive

Re: numerical fourier transforms

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94913] Re: numerical fourier transforms
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 30 Dec 2008 05:54:16 -0500 (EST)
  • References: <gjacun$p2k$1@smc.vnet.net>

Hi,

you don't understand what

{L_?Positive, \[CapitalOmega]_?Positive}

mean because you example call it with {-100, 100}
and -100 will never match _?Positive

But

FourierTransformApproximationList[
   {Sin[t] Exp[-t^2], t},
   {100, 1000}, 1024]

work as it should.

Regards
   Jens

ventutech at gmail.com wrote:
> Hi All,
> I will try to ask my question the most precise way I can, this time.
> I am reading Trott's book on Numerics.
> I need to evaluate very heavy numerical Fourier Transforms and
> NFourierTransform is taking way too long.
> So I found the code that Trott suggest for an approximation of a
> FourierTransform, by making use of the "Fractional Fourier Transform".
> What do you think about this approach? Would you suggest the use of it
> for numerical evaluation of fourier Trasforms of complicated
> functions?
> 
> Here is the code, anyway:
> 
> FourierTransformApproximationList[{f_, t_Symbol}, {L_?Positive, \
> [CapitalOmega]_?Positive},
>   n_Integer?Positive] :=  Module[{\[ScriptF] = Function[t, f], \
> [CapitalDelta]t = 2 L/n, fList,
>     fFFT, sFactor},(*list for the fractional Fourier transform*)
>   fList = Table[ Exp[2 I (2 - n) L \[CapitalOmega] n^-2 r] \[ScriptF][-
> L +
>        2 L r/n], {r, n}];  (*carry out fractional Fourier transform*)
>   fFFT = Fourier[fList, FourierParameters -> {1, 2 L \[CapitalOmega]/
> (n Pi)}];
>   (*s-dependent prefactor*)
>   sFactor =
>    Table[\[CapitalDelta]t/Sqrt[2 Pi] Exp[
>       I (n^2 - 4) L \[CapitalOmega] n^-2]*
>      Exp[2 I (2 - n) L \[CapitalOmega] n^-2 s], {s, n}];
>   (*return approximate Fourier transform*)sFactor fFFT]
> 
> My problem is that I don't understand it well enough to generalize it
> for my problem. Indeed I don't understand how to pass the function as
> an argument.
> The provided exemple is:
> 
> (*exact continuous Fourier transform*)
> approxFT =
>   FourierTransformApproximationList[{If[Abs[t] < 1, 1, 0], t}, {2,
>     10}, 512];
> 
> (*exact continuous Fourier transform*)
> 
> exactFT[\[Omega]_] =
>  FourierTransform[If[Abs[t] < 1, 1, 0], t, \[Omega]] // ExpToTrig //
>   Simplify
> 
> But how can I change the function? If I type for exemple:
> 
> approxFT =
>   FourierTransformApproximationList[
>    Sin[t] Exp[-t^2] &[t], {-100, 100}, 1024];
> 
> It doesn't work. My point is that I don't understand the "{f_,
> t_Symbol}" pattern.
> 
> Thank you very much in advance,
> 
> Davide
> 


  • Prev by Date: Re: Destructuring arguments to pure functions?
  • Next by Date: Re: Destructuring arguments to pure functions?
  • Previous by thread: Re: Destructuring arguments to pure functions?
  • Next by thread: Re: Undo and redo