Interpolate between two dimensional points

5 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Matt J
Matt J il 5 Feb 2019
Modificato: Matt J il 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.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by