Question: Writting a Linear System in Matrix Form

I have a set "EQ" containing N linear equations in N unknowns. The only symbolic variables in each "EQ[i]" are the unknowns. I want to write a procedure that derives the matrices "A" and "b" where A.x=b is the same linear system stored in "EQ". In other words, I want to write the linear system in the matrix form.

Can anyone guide me through writting such a procedure?
As an example do it with the system written in the following file.

Note: This procedure will be used for large linear systems (e.g. 2000 Equations, 2000 Unknowns) so it will be important that the procedure uses the least operations required.

Thanks in advance.

Please Wait...