I am new to manopt and playing around a bit with it using the cost function
problem.cost = @(X) -trace(A*X);
with A symmetric on the spectrahedronfactory(n,r) manifold as an example. As euclidean gradient I would expect something like
problem.egrad = @(X) -A;.
However, this yields:
Error using trace
Matrix must be square.
Apparently, I am doing something wrong and I suppose there is an easy solution for this :)
I would appreciate any short help!
Cheers,
Gerard