MATLAB: How to access the data when I do surface fitting in Curve Fitting Toolbox 2.0 (R2009a)

curveCurve Fitting Toolboxfittinglowesssftool

I have used SFTOOL for surface fitting. I do not know how to access the fitted Z-data when I use LOWESS as fit type and export the fit to workspace.

Best Answer

When you export the fit to workspace using the default names you will receive an sfit object called “fittedmodel”. To access and compute the Z-data for the fitted surface use MESHGRID to generate X and Y arrays for the surface and then use the sfit object to compute the Z-data:
[X,Y]= meshgrid(x,y); % x and y are vectors
Z=fittedmodel(X,Y);