フィルターのクリア

Determining Constants by Iterating for Best-Fit Function

2 ビュー (過去 30 日間)
Kelly Catlin
Kelly Catlin 2018 年 3 月 11 日
回答済み: the cyclist 2018 年 3 月 11 日
I have a best-fit function of a data set in the form of a n=2 polynomial. However, I also have a function of a nonlinear, exponential form with constants that must be as closely matched to this polynomial as possible by varying the values of the two unknown constants (F and tau) by iteration.
The best-fit polynomial is of the form:
D = -27.0950 + 14.6949*T - 0.1491*T^2;
The exponential function is of the form:
D= F*(tau^2)*(T/tau + exp(-T/tau) -1);
I wish to iterate through the values of T in [0,20] with increments of 0.1, and find the values of F and tau such that collectively over all the included values of T, the exponential function is minimized for the sum of squares for each data point. Does this require a function from the optimization toolbox, or a different approach entirely?

採用された回答

the cyclist
the cyclist 2018 年 3 月 11 日
You could use the nlinfit function from the Statistics and Machine Learning Toolbox to do this.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLeast Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by