problem with CSAPS (cubic smoothing spline)
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mike Rudko
el 14 de Nov. de 2016
Respondida: Isabella Osetinsky-Tzidaki
el 26 de Dic. de 2016
Hi!
I am having trouble using CSAPS function. Consider a slightly modified example from matlab manual
x = linspace(0,2*pi,21); y = sin(x)+(rand(1,21)-.5)*.1;
pp = csaps(x,y, .4)
Changing the smoothing parameter p, which is equal 0.4 in the case above, gives you different fitting curves. However, if I extend the range of data sites, say x=linspace(0,100*pi,21), then no matter which value of smoothing parameter p I use it gives me exactly the same curve. Conversely, if I shrink the interval then it gives me just a straight line irregardless of the p-value. Any thoughts?
Thanks!
0 comentarios
Respuestas (1)
Isabella Osetinsky-Tzidaki
el 26 de Dic. de 2016
Your n=21 in linspace is too small for influencing your 0-100*pi range curve
0 comentarios
Ver también
Categorías
Más información sobre Splines en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!