How to return function handle from fit
조회 수: 10 (최근 30일)
이전 댓글 표시
Now I need a function handle not a fit object, what should I do?
F_fitted = fit(Phi2_y',Phi2_Phi','gauss8');
This gives a fit object not a handle.
댓글 수: 0
답변 (2개)
Adam
2017년 5월 12일
I don't have the curve fitting toolbox, but objects come with a variety of functionality in terms of methods and properties. Maybe this link will help, which comes directly from the main documentation page on the fit function.
댓글 수: 0
Steven Lord
2017년 5월 12일
Write an anonymous function that simply evaluates the fit.
f = @(x) F_fitted(x)
Alternately, if you describe what function you're trying to call that accepts a function handle but not a fit object, we may be able to offer more specific guidance (or suggest that you file an enhancement request.)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!