curve fitting toolbox

2 ビュー (過去 30 日間)
SARAH ZAVAREH
SARAH ZAVAREH 2011 年 3 月 18 日
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'.

採用された回答

Sarah Wait Zaranek
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 件のコメント
Sarah Wait Zaranek
Sarah Wait Zaranek 2011 年 3 月 18 日
Aside -- your name and mine are quite similar.
SARAH ZAVAREH
SARAH ZAVAREH 2011 年 3 月 19 日
Great! Thank you.
But another duestion: Do you know how I can find in which points 1th derivative is equal to zero? (how we can solve first derivative equation?)
p.s. yeah our names are the same :D

サインインしてコメントする。

その他の回答 (1 件)

SARAH ZAVAREH
SARAH ZAVAREH 2011 年 3 月 21 日
Do you know how I can find in which points 1th derivative is equal to zero? (how we can solve first derivative equation?)
  2 件のコメント
Sarah Wait Zaranek
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
SARAH ZAVAREH
SARAH ZAVAREH 2011 年 3 月 29 日
Thanks alot for your useful helps :)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by