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!