curve fitting: problem using fitoptions
显示 更早的评论
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
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!