Surface fitting tool. What does center and scale do?
31 次查看(过去 30 天)
显示 更早的评论
Hi everybody,
As the title says, I'm playing with surface fitting tool to create my surface using linear method. Can someone please explain to me what the option center and scale is doing to my graph. I have tried to do same thing with griddata function and I get the same result for my surface as I get using fitting tool but only when center and scale box is unchecked.
Thanks in advance.
0 个评论
采纳的回答
Tom Lane
2012-9-5
If you have the Statistics Toolbox, the following commands will reproduce the sftool results:
[X,Y,Z] = peaks;
x2fx([X(:) Y(:)],'q')\Z(:) % without centering/scaling
x2fx(zscore([X(:) Y(:)]),'q')\Z(:) % with centering scaling
The idea is that the x variable is replaced by (x-mean(x))/std(x) and the y variable is replace similarly. This is done before any polynomial terms are computed. The transformation won't change the fit theoretically, but it will make the results better conditioned on a computer with finite precision.
3 个评论
Tom Lane
2012-9-6
Can you tell me what type of fit you used? You mentioned linear in your original question. I assume that is linear interpolation?
Unfortunately we have stepped out of my area of expertise. I think this interpolant is based on a Delauney triangulation, and I would expect that to be affected by different scaling of the X and Y data. I don't know enough about the method or your data to have any intuition about whether one ought to be smoother or better than the other.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!