Solving large system of equations without explicit solution

1 次查看(过去 30 天)
Hello all,
I'm trying to develop a model in MATLAB for some of my data. I'm pretty much at my last point except what I thought would work, didn't. I have a set of 11 equations, each one a different datapoint evaluated at my input variables. Between these 11 equations, I have 8 constants that I need to solve for. MATLAB is irritated because I have more equations than variables and because there isn't an explicit solution. I know I won't be able to get values for my constants that satisfy all 11 perfectly. I thought "solve" would act like a regression and find the best fit given all 11 equations but evidently it doesn't. Is there a way to do what I want that I've missed?
Thank you for your time and assistance.

回答(1 个)

Walter Roberson
Walter Roberson 2011-9-14
Sorry, solve() is part of the symbolic toolbox, and does not handle regressions.
The symbolic toolbox tool that would at first appear to be most appropriate would be stats::reg .
However, this will not necessarily be any better than MATLAB's usual nonlinear regression tools, if you already know the equations.
Please note that stats::reg is part of the MuPad standard library, and does not have a direct interface to MATLAB itself. To use it, you will need to use either evalin(symengine,....) or else feval(symengine,'stats::reg',....)
  3 个评论
Walter Roberson
Walter Roberson 2011-9-14
What form are the symbolic expressions? If they are polynomials then the coefficients can be extracted using coeffs or sym2poly.
B K
B K 2011-9-14
It's a polynomial! Coeffs just made my life beautiful. Thank you so much!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spline Postprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by