Symbolic Partial derivative

3 visualizzazioni (ultimi 30 giorni)
mortain Antonio
mortain Antonio il 25 Mag 2011
Hello, I am trying to work out some partial derivative parameterised. Let's define p=1...9, i=1...4 and x={x_1,...,x_i} the equation to calculate is:
H_p=((-1)^p)*exp(0.5*x^T*x)*D^p/(Dx_1Dx_2..D_x^i[exp(-0.5*x^T*x)]
Which for p=1 and i=2 (Dx_1)H_1=x_1 and (Dx_2)H_1=x_2
Which for p=2 and i=2 (D^2x_1)H_2=(x_1^2-1) and (D^2x_2)H_2=(x_2^2-1) and (Dx_1Dx_2)H_2=(x_1*x_2)
Which for p=3 and i=2 (D^3x_1)H_3=(x_1^3-3*x_1) and (D^2x_1Dx_2)H_3=(x_1^2*x_2-x_2) and (D^2x_2Dx_1)H_3=(x_1*x_2^2-x_1) and (D^3x_2)H_3=(x_2^3-3*x_2)
etc....which come from the hermite polynomials of order p.
Do you have any suggestion how to calculate those symbolic derivatives and make th code flexible so that it will calculate them at different i and P or it is better to hard code the derivatives in your opinion?
Thanks

Risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by