Answered step by step
Verified Expert Solution
Question
1 Approved Answer
solve using matlab use python or matlab 5.7. The goal of this exercise is to show that using the Cramer formulas is a bad idea
solve using matlab
use python or matlab
5.7. The goal of this exercise is to show that using the Cramer formulas is a bad idea for solving the linear system Ax = b, where A is a nonsingular nxn matrix and be R". Denoting by a1,..., An the columns of A, Cramer's formula for the entry x; of the solution x is x; = det (ai) ... Jai-1|blai+1 ... lan)/ det A (see Proposition 5.1.1). Write a function Cramer computing the solution x by means of Cramer's formulas and compare the resulting solution with that obtained by the instruction A\b. Hint. Use the Matlab function det for computing the determinant of a matrix. Application: for n 20,40, 60, 80,... consider the matrix A and vector b defined by the instructions b=ones (n,1);c=1:n; A=c'*ones (size(c)); A=A+A'; s=norm(A,'inf'); for i=1:n, A(i,i)=s; end; Conclude about the efficiency of this method Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started