Interpolate between two dimensional points

5 views (last 30 days)
Hi Guys,
i need some help with a problem i have.
Ich have a point cloud. All Points are two dimensional and therefore have an x and y value. Each Point in this cloud define a x and y error.
Now i have a new 2d point which is soomwhere in this point cloud and from which i want to interpolate the x and y error.
How can i do this ?
My idea was to find the two nearest Points from the point cloud to this new point but i m not sure how to do this. Is there any possibility to do this with Matlab ? Or isn't it better to use 4 points around that point to interpolate the error ?
Thanks in advance for your help.

Accepted Answer

Matt J
Matt J on 5 Feb 2019
Edited: Matt J on 5 Feb 2019
One way is to use scatteredInterpolant
F=scatteredInterpolant(x,y,Error);
newError=F(newpoint);
This is the most efficient if you need to reuse F multiple times, but you could also use griddata.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!