MAT 350 3.16 MATLAB
In this activity you will find the solution to a system of linear equations using Cramer’s Rule.
Consider the system of linear equations:
Create the coefficient matrix C and column matrix of constants d.
C = [4 1; 2 -3]
d = [5; 13]
Note: Cramer’s Rule only applies to systems of linear equations with invertible square coefficient matrices.
Initialize the matrices C1 and C2 to equal C.
C1 = C
C2 = C
Replace column 1 in C1 with the column vector of constants d.
C1(:,1)=d
Replace column 2 in C2 with the column vector of constants d.
C2(:,2)=d
The solution can now be found
using ratios of determinants.
x = det(C1)/det(C)
y = det(C2)/det(C)
Utilize the following linear system of equations for this activity.
Create the coefficient matrix A and column matrix of constants b.
A = [1, 1, -1; 3, -2, 1; 1, 3, -2]
b = [6; -5; 14]
Initialize the matrices A1, A2, and A3 as matrix A.
A1 = A
A2 = A
A3 = A
Replace the appropriate columns in A1, A2, and A3 with the column vector of constants b.
A1(:, 1) = b
A2(:, 2) = b
A3(:, 3) = b
Find the solution for x1, x2, and x3 using ratios of determinants.
x1 = det(A1)/det(A);
x2 = det(A2)/det(A);
x3 = det(A3)/det(A);
An Evaluation of The Dilemma at Benevento Foods.
Order This Paper
Reviews
There are no reviews yet.