griddata interpolation 3 variables, determine mid values

1 visualización (últimos 30 días)
Brasco , D.
Brasco , D. el 4 de Jul. de 2014
Respondida: Andrei Bobrov el 4 de Jul. de 2014
hi guys. Let say i have 3 variables, X,Y,Z. I got a graph of X(x-axis) , Y (y-axis) for different Z values. Let say Z velues are ; Z=0:2:20; I also got the X and Y values for each Z value. I got X,Y line for each Z. However i need to determine the values of X,Y for different Z values. For example;
for Z=2 i know X and Y values (line 1 )
Z=4 i know X and Y values too. ( line 2)
Z=6 i know ... etc.
but i need to determine X and Y values for Z = 2,5 or let say any value between two known values of Z(e.g Z =5.5 or Z=7.8..)
is there a way to do this ?

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 4 de Jul. de 2014
xf = gridedInterpolant(Z,X);
yf = gridedInterpolant(Z,Y);
F = @(z)[xf(z(:)), yf(z(:))];
use function F:
xy = F(2.5);

Categorías

Más información sobre Function Creation en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by