Weighted Orthogonal Least Squares

Fits line ax+by+c=0 to supplied points and their weights
ダウンロード: 1.3K
更新 2011/3/21

ライセンスの表示

The function computes parameters a, b, and c of the weighted orthogonal least squares fit of line ax+by+c=0 to a set of 2D points with coordinates given by x and y and weights w.

n=100;
x=1:n;
y=2.5*x + (5+300./x).*randn(1,n);
plot(x,y,'.k')
hold on
w=1:n;
[a b c] = wols(x,y,w);
plot([0,n],[-c/b,-c/b - a/b*n],'-r','LineWidth',2)

引用

Andrey Sokolov (2024). Weighted Orthogonal Least Squares (https://www.mathworks.com/matlabcentral/fileexchange/28894-weighted-orthogonal-least-squares), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLeast Squares についてさらに検索
タグ タグを追加
謝辞

ヒントを与えたファイル: Smoothing 2D Contours Using Local Regression Lines

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.2.0.0

fixed a small typo in wols.pdf

1.0.0.0