%% Fit a Surface Using Variables in a MATLAB Table
% Load the franke data and convert it to a MATLAB® 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 )

% Copyright 2012 The MathWorks, Inc.