can you help with his exercise?
1 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!