Surface Fit off in one corner of a polynomial surface
I am trying to fit a surface to some noisy data so that this surface can be subtracted from the data to normalize the background. However when I fit the fit is good except at one corner where it is way off (see picture). Does anyone have a suggestion on how to get the surface to fit the data in the corner more closely.
Poly 55 seems to work better than poly44 or poly 33.
Another option i did was to break the 2D matrix into vectors and fit a curve to each row vector which worked very well with poly4. But I would like to solve this problem with surface fitting.
Thanks.
The code I am using is:
[f gof] = fit([xdata’,ydata’],zdata’, ‘poly55’)
plot(f, [xdata’,ydata’],zdata’)I am trying to fit a surface to some noisy data so that this surface can be subtracted from the data to normalize the background. However when I fit the fit is good except at one corner where it is way off (see picture). Does anyone have a suggestion on how to get the surface to fit the data in the corner more closely.
Poly 55 seems to work better than poly44 or poly 33.
Another option i did was to break the 2D matrix into vectors and fit a curve to each row vector which worked very well with poly4. But I would like to solve this problem with surface fitting.
Thanks.
The code I am using is:
[f gof] = fit([xdata’,ydata’],zdata’, ‘poly55’)
plot(f, [xdata’,ydata’],zdata’) I am trying to fit a surface to some noisy data so that this surface can be subtracted from the data to normalize the background. However when I fit the fit is good except at one corner where it is way off (see picture). Does anyone have a suggestion on how to get the surface to fit the data in the corner more closely.
Poly 55 seems to work better than poly44 or poly 33.
Another option i did was to break the 2D matrix into vectors and fit a curve to each row vector which worked very well with poly4. But I would like to solve this problem with surface fitting.
Thanks.
The code I am using is:
[f gof] = fit([xdata’,ydata’],zdata’, ‘poly55’)
plot(f, [xdata’,ydata’],zdata’) surface fitting, curve fitting MATLAB Answers — New Questions