Solving large system of equations without explicit solution

조회 수: 3 (최근 30일)
B K
B K 2011년 9월 14일
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