Use MATLAB to work all problems Provide printouts of the MAT
Use MATLAB to work all problems. Provide printouts of the MATLAB workspace and/or any m-files you write to solve the problems. Problem 1: Given the following system of linear equations: [12 4 11 9 7 3 1 18 6 24 21 5 8 13 10 1]{x_1 x_2 x_3 x_4} = [8 20 42 25} Use Cramer\'s Rule to solve for x. Check your answer using the backslash operator. Provide a printout of your MATLAB workspace showing your work. Draw boxes around your answers.
Solution
A=[12 4 11 9; 7 3 1 18; 6 24 21 5; 8 13 10 1] B=[8;20;42;25] x = ones(4,1) a_det = det(A); for i = 1:4 C = A; C(:,i) = B; x(i,1) = det(C)/a_det; end x = A\\B