can you help with his exercise?

2 ビュー (過去 30 日間)
Alessandro Di Gaetano
Alessandro Di Gaetano 2017 年 6 月 4 日
回答済み: Sid Jhaveri 2017 年 6 月 6 日
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)

回答 (1 件)

Sid Jhaveri
Sid Jhaveri 2017 年 6 月 6 日

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by