I have a bilinear form, that is an expression that may be written down in the form
and what I like to do is extract the Matrix(n,m) from it.
One way of doing that is take the derivatives of the expression in terms of the components of the two vectors. However, in my view coeffs should work as well. The problem is I don't see how the returned results are sorted out based on my supplied list, e.g.
coeffs(expr, [beta, beta, beta, beta, beta, u_1, v_1, u_2, v_2, u_3, v_3, u_4, v_4]);
-a, (1/3)*a, -(1/3)*a, -a, -a, b, b, -(1/3)*b, (1/3)*b, b, b, a, a, -(1/3)*a, (1/3)*a, a, a, -b, -b, (1/3)*b, -(1/3)*b, -b, -b, -a;
Because in my particular case expr is quite long I did not copy it here.
thanks so much