fittype with user defined fit-function
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!