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)

 Respuesta aceptada

Bob Thompson
Bob Thompson el 9 de Feb. de 2021

0 votos

I'm assuming you have the data for the surface points. If so, I believe interp2 will do what you're asking.

2 comentarios

Aleksey Gureev
Aleksey Gureev el 9 de Feb. de 2021
Editada: Aleksey Gureev el 9 de Feb. de 2021
Hello. Thank you for your answer. How can I use it? I tried like this
interp2(X, Y, V, 0, 0) - if I want to get at x = 0, y = 0, but It doen't work for me. Numbers in X and Y not monotonic.
Aleksey Gureev
Aleksey Gureev el 9 de Feb. de 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)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Interpolation en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Etiquetas

Preguntada:

el 9 de Feb. de 2021

Comentada:

el 9 de Feb. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by