curve fitting: problem using fitoptions
Afficher commentaires plus anciens
Hey hey,
i try to fit a function. If i use the following code i don't get an error but the fitting is horrible.
g=fittype(sin(pi/2*(Cs*0.5^3*x^4 - 2*Dz*x^2));,...
'independent','x');
[c2,gof2] = fit(x.',data,g)
Now want to use some other fitting methodes for example:
s = fitoptions('Method','NearestInterpolant');
g=fittype(sin(pi/2*(Cs*0.5^3*x^4 - 2*Dz*x^2));,...
'independent','x','option',s);
[c2,gof2] = fit(x.',data,g)
But there i get an error:
??? There is no 'lower' property in the 'interpoptions' class.
Error in ==> fit at 290 lowerbnd = get(options,'lower');
Error in ==> PCTF_fitting at 46 [c2,gof2] = fit(k.',((sin(w))).',g)
Thanks for your help
Phil
Réponses (0)
Catégories
En savoir plus sur Interpolation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!