Practical 7: Symbolic Toolbox

Practical 7

Solving Simultaneous Equations

The solve command not only allows us to find solutions of single equations, but also simultaneous equations.

The command for solving more than one equation is of the form

[a1,a2,...,an] = solve(f1,f2,...,fn,v1,v2,...,vn)

This command can solve n equations for n unknowns.

> Exercise: Using solve for Simultaneous Equations

> Use MATLAB to find the solution of the following simultaneous equations:

2y+3x=4

5y-2x=5

> This time you will need to create two functions, f1 and f2 to solve f1=0 and f2=0 using the following command:

[x,y] = solve(f1,f2)