Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Interpolation with missing data

1 view
Skip to first unread message

Felix S.

unread,
Oct 9, 2008, 9:53:24 AM10/9/08
to
Hi, all

I'm seaching for a solution how to interpolate with missing data (NaN). I tried the function "naninterp.m" but I doens't work good because of the complexity (non-stationarity) of my data.

My original data (with missind values) looks like this:
http://freenet-homepage.de/physicnews/datafiles/MissingValues11ce1b7338f.png

The red line in the figure represents the interpolated values calculated with "naninterp.m".

Does anybody knew a solution how to improve the interpolation?

Thanks!

John D'Errico

unread,
Oct 9, 2008, 11:43:01 AM10/9/08
to
"Felix S." <integral-sc...@web.de> wrote in message <gcl2ck$pt$1...@fred.mathworks.com>...

Use of a code like naninterp, or for that
matter my own inpaint_nans, MUST fail on
this data. At least, it will fail to give you
an interpolant that comes anything near
to the values inside that hole. These tools
try to provide a SMOOTH interpolant
across that hole.

You are looking for something that will
not only interpolate across that large hole
in your data, but will also match the
"texture" of your function inside the hole.
For this you will probably need to use
some sort of time series or Fourier series
approach.

John

Felix S.

unread,
Oct 9, 2008, 12:42:01 PM10/9/08
to
Hi John,

thank your for your reply.
Yes, the problem relies on my data - not the (well programmed) functions "naninterp" and "inpaint_nans" ;)
I'm looking for a function to reconstruct the "fine structure" of my data. Your hint about a Fourier series approach is good. I will try it. Thanks!

Andor

unread,
Oct 9, 2008, 2:25:06 PM10/9/08
to
Felix S wrote:
> Hi, all
>
> I'm seaching for a solution how to interpolate with missing data (NaN). I tried the function "naninterp.m" but I doens't work good because of the complexity (non-stationarity) of my data.
>
> My original data (with missind values) looks like this:http://freenet-homepage.de/physicnews/datafiles/MissingValues11ce1b73...

>
> The red line in the figure represents the interpolated values calculated with "naninterp.m".

Filling such gaps can be achieved using prediction filters, as is
described for example here:

http://lib.tkk.fi/Diss/2004/isbn9512269503/article3.pdf

There is a free Matlab Toolbox called WarpTB from Aki Harma for
computing warped prediction coefficients and for warped filtering.
Also, one of the authors of the above paper (Paulo) has been very
forthcoming and helpful when contacted directly.

Regards,
Andor

Felix S.

unread,
Oct 10, 2008, 8:22:02 AM10/10/08
to
Hi Andor,

thank your very much for your excellent tip about the "prediction filters" and "WarpTB"! It's exactly that what I need to solve the probem.

Regards,
Felix

0 new messages