regressionp

Version 1.0.0 (2,08 KB) von Marko Hecht
polynomial regression calculation
23 Downloads
Aktualisiert 3. Dez 2019

Lizenz anzeigen

calculates polynomial regression function

input: x [m x 1 double]: x-values of input data
y [m x 1 double]: y-values of input data
n [1 x 1 double]: order of polynomial regression line
default is set to 1

output: Y [1 x 1 symfun]: regression line as matlab function
R [1 x 1 double]: squared mean mistake

written by Marko Hecht, Karlsruher Institute of Technology, November 2019

I basically only implemented the content of explanation given on this webpage:
http://polynomialregression.drque.net/math.html

The function is not perfect though because I solve the least squares problem by inverting the weighted parameter matrix to multiply it with the y-values to receive the solution. As some parameters may be close to zero, Matlab issues a warning in the command window. Any suggestions as to how to solve this more elegantly are very welcome.

Important: this function is not meant to extrapolate!

Zitieren als

Marko Hecht (2025). regressionp (https://de.mathworks.com/matlabcentral/fileexchange/73531-regressionp), MATLAB Central File Exchange. Abgerufen.

Kompatibilität der MATLAB-Version
Erstellt mit R2019b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Polynomials finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0