Get exact curve parameters in the fit function
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Thorben H
am 20 Sep. 2023
Kommentiert: Thorben H
am 20 Sep. 2023
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
0 Kommentare
Akzeptierte Antwort
the cyclist
am 20 Sep. 2023
Bearbeitet: the cyclist
am 20 Sep. 2023
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
format long
pi
Alternatively, just store the value in a variable, and use the variable in your anonymous function.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!