How can I get the equation of 3D interpolation?
3 views (last 30 days)
Show older comments
I'm trying to get the equation of 3D interpolation but i don't know how to do it. ¿How can I get the equation?
Currently I'm getting the values putting F(x,y) in the command window.
x = [470;470;470; 1000; 1000; 1000;];
y = [1;2;3; 1;2;3];
z = [-2.68;-0.98;-0.55;-1.42;0.36;0.8];
scatter3(x,y,z)
F = scatteredInterpolant(x,y,z);
[xq,yq] = meshgrid(470:1000,1:3);
vq1 = F(xq,yq);
plot3(x,y,z,'mo')
hold on
mesh(xq,yq,vq1)
legend('Sample Points','Interpolated Surface','Location','NorthWest')

4 Comments
Accepted Answer
Matt J
on 5 Mar 2019
Edited: Matt J
on 5 Mar 2019
I think you want griddedInterpolant instead:
F=griddedInterpolant({current,impedance,frequency}, Error);
Now just use it to evaluate the error at any combination of current, impedance, and frequency of interest,
error_q=F(current_q,impedance_q,frequency_q);
You do not need to fit an equation to your original data.
0 Comments
More Answers (1)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!