Borrar filtros
Borrar filtros

How can I save cubic spline coefficients for a cubic spline fit to a surface?

2 visualizaciones (últimos 30 días)
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 comentarios
John D'Errico
John D'Errico el 6 de Abr. de 2016
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.
Josh Levin
Josh Levin el 7 de Abr. de 2016
Hi Mr. D'Errico,
Thank you for the suggestions. I am fairly comfortable with splines in one dimension, but you are certainly right that I need to familiarize myself with splines in two dimensions.
Are there MATLAB tools or functions I can look into to eventually help me out with this task? I'm not looking for an easy solution, but I do want to know that I'm heading in the proper direction.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Splines en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by