MathGroup Archive 2005

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

Search the Archive

Re: faster Interpolation?


Alessandro, the fastest approach is to (1) upsample your data and (2)
convolve.

(1) here I double the length of my data by inserting zeros

L = Length[data];
nL = 2 * Length[data];
zero = Table[0., {nL}];
zero[[ Range[1,nL,2] ]] = data;

(2) convolve

ListConvolve[ {0.5, 1., 0.5}, zero, 2, 0.]


However, if your data is length L, your result will be length 2L, then you
need a total of 24*L bytes of memory to do the job. Clearly, you will not be
able to work with data of size 10^9 samples (on 32-bit systems)!


Bye, Mariusz






>>> Alessandro Strumia<astrumia at mail.df.unipi.it> 07/21/05 3:30 AM >>>
hello,

I need to compute a linear interpolation of a single-parameter function
defined on an equally-spaced grid, and I do not need its derivatives.

The ListInterpolation function of Mathematica can do this and much more,
but it is not fast enough for my purposes:
it takes almost 10^-3 Second on my computer,
and I need to compute the function in about 10^9 points.
The total running time would be about one month: too slow!

So I wonder if there is a faster alternative.


Thank you very much,
Alessandro Strumia




  • Prev by Date: Re: Mathematica 5.2: The 64-bit and multicore release
  • Next by Date: Re: Gridlines in MultipleListPlot
  • Previous by thread: Re: faster Interpolation?
  • Next by thread: Re: faster Interpolation?