MATLAB Answers

Derivative of a polynomial in MATLAB

8 views (last 30 days)
Fred
Fred on 11 Feb 2013
Hi,
I want to create a series of Hermite polynomials which includes derivative. How can I do that since MATLAB does not have derivative function? This is the polynomial: http://upload.wikimedia.org/math/a/6/a/a6a7ef35134c07aafcdbdefe522ae3cf.png Thanks

  0 Comments

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 11 Feb 2013
If you have access to the symbolic toolbox, then
syms x
n = 7;
t = num2cell(x[ones(1,n)));
diff(exp(-(x^2)/2), t{:})

  1 Comment

Walter Roberson
Walter Roberson on 11 Feb 2013
Note that exp(-(x^2)/2) is not a polynomial, and that makes a significant difference to your choices. If it was a polynomial then you would be able to take advantage of http://www.mathworks.com/help/matlab/ref/polyder.html

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by