You must use MATLAB for this.
In linear algebra, Cramer's rule is an explicit formula for the solution of a system of linear equations with as many equations as unknowns, valid whenever the system has a unique solution. It expresses the solution in terms of the determinants of the (square) coefficient matrix and of matrices obtained from it by replacing one column by the vector of right-hand sides of the equations. The Cramer's rule for 3 equations and 3 unknowns is as follows:
Cramer's Rule for Three Equations in Three Unknowns
The solution to the system
ax + by + cz = a
ax + by + cz = d
ax + by + cz = d
D, D, and D are given by x = D where
D =
a d c
D =
a d c
D =
a d c
provided that D ≠0.
Next, using three different methods, you will write a MATLAB script to solve the following system of linear equations:
3x + 4y + 6z = 1
-2y + 7z = 10
2x + 3y - 9z = 15
Task 1: Use the left division operator to find the solution vector (x, y, z).
Task 2: Write a custom function called Cramer_rule(A, b) to find the vector x in Ax = b.
Task 3: Use the custom function you wrote to find the solution vector (x, y, z) for the above linear equations.
Task 4: Use Gaussian elimination to find the solution vector (x, y, z).
Task 5: Use Gauss-Jordan elimination to find the solution vector (x, y, z).