MATLAB: Finding the ‘n’-th derivative of a function containing ‘n’

differentiationlaguerreSymbolic Math Toolbox

Hi all,
I'm currently trying to plot the associated laguerre polynomials
,however I'm having difficulties with the differentiation term, as
diff(exp(-x)*x^(n+k),x,n)
differentiates first with regard to a, then with regard to n, instead of differentiating n times with regard to x.
Is there a way to have it do the latter (differentiate n times with regard to x)?
Thank you

Best Answer

syms x k
n = 10;
diff(exp(-x)*x^(n+k),x,n)