least squares surface fitting with a non-polynomial function

3 次查看(过去 30 天)
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.

采纳的回答

Matt J
Matt J 2014-8-19
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 个评论
David
David 2014-8-20
Many thanks, I should have mentioned that I don't have the optimisation toolbox, but in any case fminspleas is working well.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Least Squares 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by