Issue with rounding of smoothing parameter in fit
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to use the fit() function to produce smoothed spline curves, and display multiple curves on one plot for comparison. I used the Curve Fitting app to determine the best smoothing param based on relative smoothness and fit stats
s_param = [0.99985344]
spartcurve = fit(x_elev,y_spart,'smoothingspline')
spartop = fitoptions(spartcurve)
spartop.SmoothingParam = s_param
Everything works smoothly, except Matlab seems to be rounding my smoothing parameter to 1, which is a problem because small numerical changes produce large changes in the roughness/smoothness of the curve. The console shows the following after running the above:
spartop =
Normalize: 'off'
Exclude: []
Weights: []
Method: 'SmoothingSpline'
SmoothingParam: 1.0000
This seems like something that might be related to how Matlab handles floating point numbers but I am not well versed enough to figure it out.
Thank you for your help!
3 件のコメント
Mathieu NOE
2020 年 11 月 30 日
well
in case that could be of any help , this is a simple code to do some data (experimental or model) smoothing
might be enough for simple tasks and you have only one parameter to dela with
regards,
回答 (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!