Thread Subject: question regarding 2D interpolation

Subject: question regarding 2D interpolation

From: Frank Chang

Date: 17 Mar, 2010 19:14:47

Message: 1 of 4

Hi Group,

I have a question regarding 2D interpolation of incomplete data. I
there there ought to be solutions for this, but I cannot come up with
it. If you could please give me some hint, I'd highly appreciate!

Let's say that I have a few scattered data points in a 3 x 3 data
array.

(1, 1, 1.4)
(1, 3, 2)
(2, 1, 2.4)
(2, 3, 3.6)
(3, 1, 2)
(3, 3, 4.2)

Here, the first and second elements of ( ) are the index of array and
column. The third is the value for this given data point.

I would like to project these data points onto a 3 x 3 data array and
fill in the rest, vacant data points with interpolated values. I think
interp2 can do this, but I failed to realize it...

Again, thank you for your help!

Regards,
Frank

Subject: question regarding 2D interpolation

From: John D'Errico

Date: 17 Mar, 2010 20:46:09

Message: 2 of 4

Frank Chang <etaghtron@gmail.com> wrote in message <14d58e0d-da60-4ba3-9a94-ca5d7bf713c2@z4g2000yqa.googlegroups.com>...
> Hi Group,
>
> I have a question regarding 2D interpolation of incomplete data. I
> there there ought to be solutions for this, but I cannot come up with
> it. If you could please give me some hint, I'd highly appreciate!
>
> Let's say that I have a few scattered data points in a 3 x 3 data
> array.
>
> (1, 1, 1.4)
> (1, 3, 2)
> (2, 1, 2.4)
> (2, 3, 3.6)
> (3, 1, 2)
> (3, 3, 4.2)
>
> Here, the first and second elements of ( ) are the index of array and
> column. The third is the value for this given data point.
>
> I would like to project these data points onto a 3 x 3 data array and
> fill in the rest, vacant data points with interpolated values. I think
> interp2 can do this, but I failed to realize it...
>
> Again, thank you for your help!
>
> Regards,
> Frank

No, interp2 cannot do this. Download inpaint_nans
from the File Exchange. Fill with nan elements the
holes in your array to be interpolated. Inpaint_nans
will then replace the nans with interpolated values.

http://www.mathworks.com/matlabcentral/fileexchange/4551

John

Subject: question regarding 2D interpolation

From: ImageAnalyst

Date: 19 Mar, 2010 13:29:36

Message: 3 of 4

Frank:
Maybe you mgiht want to learn about kriging:
http://en.wikipedia.org/wiki/Kriging
"Kriging is a group of geostatistical techniques to interpolate the
value of a random field (e.g., the elevation, z, of the landscape as a
function of the geographic location) at an unobserved location from
observations of its value at nearby locations.........."

Or:
http://www.nbb.cornell.edu/neurobio/land/OldStudentProjects/cs490-94to95/clang/kriging.html

Subject: question regarding 2D interpolation

From: ImageAnalyst

Date: 19 Mar, 2010 17:07:16

Message: 4 of 4

I'm sure it's overkill for this simple situation, but there is a new
and emerging field of study called "compressed sensing" that you may
find related and fun. See these pages:

Wired Magazine article:
http://www.wired.com/magazine/2010/02/ff_algorithm/2/
"Compressed sensing is a mathematical tool that creates hi-res data
sets from lo-res samples. It can be used to resurrect old musical
recordings, find enemy radio signals, and generate MRIs much more
quickly......."

Steve's Mathworks Image Processing Blog:
http://blogs.mathworks.com/steve/2008/04/04/reconsidering-the-impossible/

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com