Hello,
> Does manoptAD work for cost functions containing multiple matrices?
Yes, manoptAD works for manifolds created by productmanifold.
If what you want is to optimize over K matrices of size NxM, each of which has unit Frobenius norm, you could also do this (I expect it would lead to faster code, if that's relevant for your use case):
problem.M = obliquefactory(N*M, K); % this is the manifold of matrices of size (N*M) x K whose columns each have unit norm
Then, whenever you get a point X on the manifold, you can form the matrices with XX = reshape(X, [N, M, K]); Now XX(:, :, 1) is the first matrix, X(:, :, 2) is the second one, etc.
To transform an array of matrices G into a matrix again (e.g., for the gradient), you call reshape(G, [N*M, K]);
I hope this helps,
Nicolas