Issue with rounding of smoothing parameter in fit
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Mathieu NOE
il 30 Nov 2020
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,
Risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!