eqn1 =
Write your equations as
A*z = b
for a 2x2-matrix A and a 2x1-vector b with z being the vector of unknowns [x;y].
To solve for z, you can then use "mldivide":
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!