Maybe:
x = {1/2 a + 1/3 b, b + c, 2 a + c, 1/3 c + 4 d}; CoefficientArrays[x, {a, b, c, d}][[2]] // MatrixForm
In case you want coefficients for all variables, use the compact form:
CoefficientArrays[x][[2]] // MatrixForm
In the event that you do not want the coefficients of all variables, part [[1]] comes into play:
x2 = {1/2 a + 1/3 b + q - y, b + c + 1/2 r, 2 a + c + 2 y, 1/3 c + 4 d}; CoefficientArrays[x2, {a, b, c, d}][[1]] // Normal
{q - y, r / 2, 2 y, 0} So you can restore your expression.
source share