can you help with his exercise?

2 views (last 30 days)
Alessandro Di Gaetano
Alessandro Di Gaetano on 4 Jun 2017
Answered: Sid Jhaveri on 6 Jun 2017
Let A=M+10I, being M the matrix generated by the command magic(432) and I the identity matrix. Let b be the right-hand side such that the solution of the linear system Ax=b is a vector with all elements equal to 1. Solve the linear system with the gaussian elimination method natively implemented in MATLAB. Let N_r be the infinite norm of the residual b-Ax. Which of the following values is the closest to N_r?
(a) 5.6e-1 (b) 7.2e-5 (c) 1.2e-3 (d) 9.6e-6 (e) 8.9e-8
this is what I tried:
M=magic(432); I=eye(432); A=M+10*I;
[L U P]=lu(A); x=U\(L\(P*b));
nr=norm(b - A*x, inf)

Answers (1)

Sid Jhaveri
Sid Jhaveri on 6 Jun 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by