Interpolation for x,y,z values
Afficher commentaires plus anciens
I am doing interpolation of z using x & y values ..But I am getting NAN values using interpolation how can I removed this NAN and interpolate it to gives actual Value.. I am herewith attaching my Excel file, code and error

clear all
close all
clc
a=xlsread('Book2.xlsx')
x = a(:,1);
y =a(:,2);
z = a(:,3);
xq=[800 1000 1250 1500 1750 2100 2500 3000 3500 4000 4500 5000 5500 6000 6500];
yq=(100:100:2700)'
vq = griddata(x,y,z,xq,yq)
mesh(xq,yq,vq)
hold on
plot3(x,y,z,'o')
Réponse acceptée
Plus de réponses (1)
Mathias Smeets
le 29 Juil 2022
0 votes
You are getting NaN points because some query points (for example your lowest y-values) are outside your actual data. It is not possible to extrapolate with the griddata function. Look this link for more information.
1 commentaire
Prasad Joshi
le 29 Juil 2022
Catégories
En savoir plus sur Interpolation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

