can you help with his exercise?

2 Ansichten (letzte 30 Tage)
Alessandro Di Gaetano
Alessandro Di Gaetano am 4 Jun. 2017
Beantwortet: Sid Jhaveri am 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;
b=sum(A,2);
[L U P]=lu(A); x=U\(L\(P*b));
nr=norm(b - A*x, inf)

Antworten (1)

Sid Jhaveri
Sid Jhaveri am 6 Jun. 2017

Kategorien

Mehr zu Dynamic System Models finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by