In: Mechanical Engineering
Use MATLAB to solve the following problem:
x - 3y = 2
x + 5y = 18
4x - 6y = 20
We have been given two variables and three equations. Now, this is an overdetermined system. This system has unique exact solution if rank of matrix A and [A b] are same.
Our equations are
x – 3y = 2
x + 5y = 18
4x – 6y = 20
The corresponding matrix equation is
Ax = b
Where
We find the rank of matrix A and [A b] using MATLAB:
We find that the ranks are same. So, we can obtain the unique solution by using the left division method. Left division is used to solve the matrix equation Ax = b. The command is A/b.
We see that our final solution is
x = 8 y = 2.
We see that our final solution is
x = 8 y = 2.