curve fitting toolbox
4 次查看(过去 30 天)
显示 更早的评论
I'm programming in matlab and using curve fitting toolbox to fit my data. I need to evaluate the 1th derivative of my curve in some data point. Do you know how I can do it in my code? I need to use 'cubic spline (interpolant) fitting'.
0 个评论
采纳的回答
Sarah Wait Zaranek
2011-3-18
The curvefit object you get out of curvefitting tool will allow you to take a derivative at a point using the differentiate method.
See code below. I generated a fit using the command line but it is the same thing you can get out of the curvefitting toolbox.
load census
f2 = fit(cdate,pop,'cubicinterp');
fx = differentiate(f2, 0.2)
2 个评论
更多回答(1 个)
SARAH ZAVAREH
2011-3-21
2 个评论
Sarah Wait Zaranek
2011-3-22
If you have the optimization toolbox, fzero probably would be ideal.
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fzero.html
另请参阅
类别
在 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!