curve fitting toolbox

조회 수: 3 (최근 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 CenterFile 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!

Translated by