0

I have a function and I use polynomial approximation of the function in Matlab, then I calculate the differentiate of the function

ppp = fit(x,y, 'poly9')
polydiff = differentiate(ppp, x)

I would like to do the same in numpy

fx = np.polyfit( x.T, y.T, 9 )

What is the equivalent function of the differentiate?

Mokus
  • 10,174
  • 18
  • 80
  • 122
  • Did you see this question? http://stackoverflow.com/questions/9876290/how-do-i-compute-derivative-using-numpy – Danny M Apr 17 '14 at 13:49

1 Answers1

2

I'm assuming you mean polyder()? The equivalent is np.polyder()

http://www.mathworks.com/help/matlab/ref/polyder.html

http://docs.scipy.org/doc/numpy/reference/generated/numpy.polyder.html

edit: Just realized you're talking about the symbolic math toolbox, which I'm not too familiar with. See Danny M's comment for the symbolic equivalent.

sco1
  • 12,154
  • 5
  • 26
  • 48