Interpolate value of point

1 view (last 30 days)
Aleksey Gureev
Aleksey Gureev on 9 Feb 2021
Commented: Aleksey Gureev on 9 Feb 2021
Hello. I have a sufrace like on the image.How can I interpolate z-value (black cross) from this surface? I need the fastest methos (linear, for example)

Accepted Answer

Bob Thompson
Bob Thompson on 9 Feb 2021
I'm assuming you have the data for the surface points. If so, I believe interp2 will do what you're asking.
  2 Comments
Aleksey Gureev
Aleksey Gureev on 9 Feb 2021
Solved
xv = linspace(min(x), max(x), 20);
yv = linspace(min(y), max(y), 20);
[X,Y] = meshgrid(xv, yv);
Z = griddata(x,y,z,X,Y);
interp2(X, Y, V, 0, 0)

Sign in to comment.

More Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!