Effacer les filtres
Effacer les filtres

griddata interpolation 3 variables, determine mid values

3 vues (au cours des 30 derniers jours)
Brasco , D.
Brasco , D. le 4 Juil 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 ?

Réponses (1)

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

Catégories

En savoir plus sur Interpolation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by