I have the following list of 2 equations (but generally I have much more than 2 equations):
m= {A1*x+B1*Sin[x]-C1*Cos[x],C2+A2*Cosh[x]}
How could I automatically convert it into a coefficient matrix, like that:
$$\left( \begin{array}{cccccc} \text{A1} \text{x4} & \text{B1} \sin (\text{x4}) & \text{-C1} \cos (\text{x4}) & 0 & 0 & 0 \\ 0 & 0 & 0 & \text{A2} \cosh (\text{x4}) & \text{0} & \text{C2} \\ \end{array} \right)$$
Each row of the coefficient matrix corresponds to an element of the m
list and is sorted from A to Z.
Some more details:
Basically I have two equations:
(1) A1*x+B1*Sin[x]-C1*Cos[x]
(2) C2+ A2*Cosh[x]
Those equations are listed in the m
list. I could rewrite those equations like that:
(1) A1*x + B1*Sin[x] - C1*Cos[x] + 0*A2 + 0*B2+0*C2
(2) 0*A1 + 0*B1 + 0*C1+A2*Cosh[x] + 0*B2+C2
Now I create the coefficient matrix:
$$\left( \begin{array}{cccccc} \text{A1} \text{x4} & \text{B1} \sin (\text{x4}) & \text{-C1} \cos (\text{x4}) & 0 & 0 & 0 \\ 0 & 0 & 0 & \text{A2} \cosh (\text{x4}) & \text{0} & \text{C2} \\ \end{array} \right)$$
==0
? $\endgroup$