least squares surface fitting with a non-polynomial function

2 visualizaciones (últimos 30 días)
David
David el 19 de Ag. de 2014
Comentada: David el 20 de Ag. de 2014
I apologise if this is an obvious or previously answered question, I have spent some time searching for an answer and I could not find one, perhaps because I do not fully understand the capabilities of the existing least squares solvers.
I am trying to fit a surface to my data (two independent variables, one dependent) and I am not sure exactly what form the surface should take. I know that there exist functions that will fit a polynomial surface to multidimensional datasets but I don't understand which function is most appropriate for use in my case.
I know that the surface takes the general form z = A.exp(Bx) where A and B vary as a function of y. I do not know exactly how they vary and want to try several possibilities, starting by assuming that both A and B vary linearly in y (but I also want to try e.g. polynomial relationships between A, B and y), i.e. initially fitting a surface of the form z = (ay + b).exp((cy + d)x).
In this case I want to find the values of a-d that minimise the sum of squares between this function and my data. I'd be very grateful if someone could suggest a way to achieve this.

Respuesta aceptada

Matt J
Matt J el 19 de Ag. de 2014
You could apply lsqcurvefit to any of the model variations you've described. It might be worth looking at FMINSPLEAS, however. FMINSPLEAS can take advantage of the fact that z depends linearly on some of the parameters (a and b in your example). Although, if you have more than 6 nonlinear parameters, you might be pushing the limitations of the tool, since optimization of those parameters relies on Nelder-Mead.
  1 comentario
David
David el 20 de Ag. de 2014
Many thanks, I should have mentioned that I don't have the optimisation toolbox, but in any case fminspleas is working well.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Least Squares 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