I am new to symbolic computations in MATLAB and am trying out matrix differentiations.
If we take derivative of trace(X*A) w.r.t. X, we should get A^T.
But MATLAB tells me
>> syms X A;>> diff(trace(X*A), X)ans =A
Where am I wrong?
matrixsymbolic
>> syms X A;>> diff(trace(X*A), X)ans =A
Best Answer