constrained least square fitting

Hey
I need some help with constrained least squares. I have a vector A(mx1). I need to fit a degree n-polynomial f with a constraint that the f(1)=f(m). I am acquainted with matlab but never done curve fitting and some lead will be great help.
Thanks

2 件のコメント

Walter Roberson
Walter Roberson 2011 年 6 月 19 日
How strict does the tolerance have to be on f(1)=f(m) ? If they must be exactly equal, that can be difficult to achieve due to standard round-off error issues.
Naresh
Naresh 2011 年 6 月 19 日
round off errors are ok. I dont need very high precision.

サインインしてコメントする。

回答 (2 件)

Oleg Komarov
Oleg Komarov 2011 年 6 月 19 日

0 投票

You can use lsqnonneg or if you have the Optimization TB then Least Squares (Model Fitting) Algorithms
Naresh
Naresh 2011 年 6 月 19 日

0 投票

fmincon worked.
Thanks for the inputs. (cant use toolbox as such.. need to run several iterations..)

カテゴリ

ヘルプ センター および File ExchangeFit Postprocessing についてさらに検索

質問済み:

2011 年 6 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by