Computer Science, asked by 183r1a0474, 9 days ago

write a Matlab program to solve the Cramer's method of linear equations.​

Answers

Answered by Anonymous
1

Answer:

Hey mate,

here is the program you asked

A = [2 1 1; 1 -1 -1; 1 2 1]     % Coefficient Matrix

X = [3; 0; 0]

Ax = [3 1 1 ; 0 -1 -1;0 2 1 ]

Ay = [2 3 1; 1 0 -1; 1 0 1]

Az = [2 1 3; 1 -1 0; 1 2 0]

detA=det(A)

x = det(Ax)/detA

y = det(Ay)/detA

z = det(Az)/detA

Similar questions