How to return function handle from fit

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.

답변 (2개)

Adam
Adam 2017년 5월 12일

0 개 추천

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.
Steven Lord
Steven Lord 2017년 5월 12일

0 개 추천

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.)

카테고리

도움말 센터File Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

태그

질문:

2017년 5월 12일

답변:

2017년 5월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by