How can I save cubic spline coefficients for a cubic spline fit to a surface?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am essentially asking the same questions as here:
except instead of having data for x --> y, I have [x,y] ---> z. I want to fit a cubic spline to this data in MATLAB, and then extract the coefficients so I can create the mathematical spline function myself, in the form of
function z = mysplinefunction(x,y)
Just like how I could fit a polynomial curve, and then extract the coefficients and use them to write my own expression. Can this be done?
댓글 수: 2
John D'Errico
2016년 4월 6일
CAN it be done? Of course it can be done. But you need, in this case, to learn how to use splines, how to build them.
First, you should spend some time learning what a spline is, how to build one in ONE dimension, how the coefficients of the spline might be stored. Once you are FULLY comfortable in performing these computations (I think you are not yet there, from what you have said so far) then learn how you might write tools like a tensor product spline, thus a spline in two dimensions, as a function of two independent variables as you wish to do.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Splines에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!