Effacer les filtres
Effacer les filtres

can you help with his exercise?

7 vues (au cours des 30 derniers jours)
Alessandro Di Gaetano
Alessandro Di Gaetano le 4 Juin 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;
b=sum(A,2);
[L U P]=lu(A); x=U\(L\(P*b));
nr=norm(b - A*x, inf)

Réponses (1)

Sid Jhaveri
Sid Jhaveri le 6 Juin 2017

Catégories

En savoir plus sur Dynamic System Models dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by