www.gusucode.com > curvefit 案例源码程序 matlab代码 > curvefit/FitaSurfaceUsingVariablesinaMATLABTableExample.m

    %% Fit a Surface Using Variables in a MATLAB Table  

%% 
% Load the |franke| data and convert it to a MATLAB(R) table. 
load franke
T = table(x,y,z);  

%% 
% Specify the variables in the table as inputs to the |fit| function, and
% plot the fit. 
f = fit([T.x, T.y],T.z,'linearinterp');
plot( f, [T.x, T.y], T.z )