fittype with user defined fit-function
1 回表示 (過去 30 日間)
古いコメントを表示
I have data where I create a fit from:
fit_curve=fit(x,y,'smoothingspline');
% x, y long vectors
This fit I use to define a fittype:
ft=fittype(@(a,b,x) a+fit_curve(x+b));
this fittype I use in another fitfunction
fit_2=fit(k,l,ft, 'StartPoint', [k(2) l(2));
% k, l vectors with 3 elements
this makes a beautiful fit. But if I change the fittype to
ft=fittype(@(a,b,x) a*fit_curve(x*b));
then the fit_2 is totally wrong.
I tried already .* or only replace one of the + by *. How to solve the problem? Let me know, if you need more information or the plots of the curves.
0 件のコメント
回答 (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!