MATLAB: How to solve a simultaneous equation of 2 variables.

equationsMATLAB

x+3y=5;2x+4y=4. In general maths, we can be able to find the values of 'x' and 'y' from the above equations. How to find it in MATLAB?

Best Answer

If you have the Symbolic toolbox,
syms x y
solve(x + 3*y - 5, 2*x + 4*y - 4)