How to find the derivative of a polynomial fit?

25 ビュー (過去 30 日間)
Kratos
Kratos 2015 年 3 月 31 日
回答済み: Star Strider 2015 年 3 月 31 日
Hello
I have to plot 4 different subplot with the data provided. I plotted 3 of them(original, polynomial fit and integral), but I have having a hard time finding the derivative of the polynomial fit and plotting it. How do I do this?
xcor = ;% Some x value
ycor = ;% Some y value
opol = ;%order of polynomial
xx = polyfit(xcor,ycor, opol);
yy = polyval(xx, xcor);
plot(xcor, 'New derivative of polynomial fit')
How do I use the polynomial fit(xx) and the value of xor and ecru to plot the data?
Thank you.

採用された回答

Star Strider
Star Strider 2015 年 3 月 31 日
For the derivative, I would use the polyder function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by