How to return function handle from fit
5 ビュー (過去 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!