From: ali reza on
Hi everybody,

can you help me to write MATLAB symbolic commands to calculate this differentiate problem? AA[i,j] is my favorite answer:

(this is a pseudo code)
********************************************
q[i, j] := exp((a[i]-a[j])^2)/(symsum ( symsum((a[i]-a[j])^2, j ,k,n), i ,k,n))

k[i , j] := symsum( symsum(q[i, j]*log(q[i, j]), j ,k,n), i ,k,n)

AA[i , j] = diff (k[i , j] , a [ i ])
*********************************************

it is VERY IMPORTANT to use symbolic toolbox to calculate the answer in CLOSED form.

Thanks