minimum of csaps smoothing spline
Show older comments
the spline smoothing function csaps finds the minimum of a fitting term and a smoothness term .. but can u get this minimum value? I want to try different values of p (which controls the tradeoff between smoothness and fit) and look at the minimum value, but I cant see how to actually get the value.
Thx, Shaun
1 Comment
Shaun Werkhoven
on 30 Apr 2013
Answers (1)
pp = csaps(x,y,p);
[~,idx]=min(ppval(pp,x)); %initial guess of min location
[xmin,ymin]=fminsearch(@(z)ppval(pp,z), x(idx)); %refine the min
2 Comments
Shaun Werkhoven
on 30 Apr 2013
It does not appear from "doc csaps" that CSAPS will give it to you directly, but you could evaluate the function yourself using the information available from UNMKPP.
If CSAPS is an mfile, you might also be able to dig the necessary code out of there directly, or make a modified version of the code that will return the fitting error.
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!