Interpolation for x,y,z values
Mostra commenti meno recenti
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')
Risposta accettata
Più risposte (1)
Mathias Smeets
il 29 Lug 2022
0 voti
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 Commento
Prasad Joshi
il 29 Lug 2022
Categorie
Scopri di più su Interpolation of 2-D Selections in 3-D Grids in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

