I have a irregular set of data points in the form of cartesian coordinates which using the MATLAB cftool can be turned into a surface (see below).
Does anyone know a way to access the matrix of cartesian coordinates that MATLAB generates in order for it to plot this surface?
The code generated for this graph (seen below) provides no access to the any additional interpolated points which must be produced to fit the surface.
%% Fit: 'untitled fit 1'.
[xData, yData, zData] = prepareSurfaceData( x1, y1, z1 );
% Set up fittype and options.
ft = 'linearinterp';
% Fit model to data.
[fitresult, gof] = fit( [xData, yData], zData, ft, 'Normalize', 'on' );
% Plot fit with data.
figure( 'Name', 'untitled fit 1' );
h = plot( fitresult, [xData, yData], zData );
legend( h, 'untitled fit 1', 'z1 vs. x1, y1', 'Location', 'NorthEast' );
% Label axes
xlabel x1
ylabel y1
zlabel z1
grid on
Thanks in advance