フィルターのクリア

Get exact curve parameters in the fit function

7 ビュー (過去 30 日間)
Thorben H
Thorben H 2023 年 9 月 20 日
コメント済み: Thorben H 2023 年 9 月 20 日
Hi,
I have created and saved a cfit object using the fit() function.
How can I access the exact values of the coefficients? By exact I mean for example coefficients with 10 decimal places.
I am aware that I can access the coefficients using coeffvalues(fitobject) but this only gives the values with 4 decimal places. I am also aware that I can evaluate the fitobject for new data to get the exact result but this is not an option for me, I need the exact coefficient values for the use in an anonymous function.
Any help is appreciated

採用された回答

the cyclist
the cyclist 2023 年 9 月 20 日
編集済み: the cyclist 2023 年 9 月 20 日
The four decimal places are just the default display value. You can change that with the format command. For example, use format long before calling coeffvalues(fitobject).
pi
ans = 3.1416
format long
pi
ans =
3.141592653589793
Alternatively, just store the value in a variable, and use the variable in your anonymous function.
  1 件のコメント
Thorben H
Thorben H 2023 年 9 月 20 日
format... why did I not think of that.. Thanks a lot!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by