polyfitweighted

Simple function to calculate a polynomial best fit of 1D data Y with array of weights W (which must
4,1K Downloads
Aktualisiert 2. Jan 2007

Keine Lizenz

Like polyfit.m but includes weighting of each data point.

Summary
----------------
Find a least-squares fit of 1D data y(x) with an nth order polynomial, weighted by w(x).

Usage
-----

P = polyfitweighted(X,Y,N,W) finds the coefficients of a polynomial P(X) of degree N that fits the data Y best in a least-squares sense. P is a row vector of length N+1 containing the polynomial coefficients in descending powers, P(1)*X^N + P(2)*X^(N-1) +...+ P(N)*X + P(N+1). W is a vector of weights. Vectors X,Y,W must be the same length.

Class support for inputs X,Y,W:
float: double, single

By SS Rogers http://ssr.phy.umist.ac.uk

Zitieren als

Salman Rogers (2024). polyfitweighted (https://www.mathworks.com/matlabcentral/fileexchange/13520-polyfitweighted), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2006b
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.0