Get exact curve parameters in the fit function
조회 수: 7 (최근 30일)
이전 댓글 표시
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
채택된 답변
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
format long
pi
Alternatively, just store the value in a variable, and use the variable in your anonymous function.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!