When a nonsymmetric matrix is well conditioned and it is feasible to compute then can be applied to the normal equations. Write a MATLAB function [x r iter] = normalsolve(A,b,x0,tol,numiter) that...


When a nonsymmetric matrix is well conditioned and it is feasible to compute
then

can be applied to the normal equations.




Write a MATLAB function [x r iter] = normalsolve(A,b,x0,tol,numiter) that uses the normal equation approach to solving




The MATLAB command R = sprandn(m,n,density,rc) generates a random sparse matrix of size

where density is the fraction of nonzeros and the reciprocal of rc is the approximate condition number. Generate

randomly, and set x0 = ones(size,1). Using an error tolerance of

−10
and maximum number of iterations set to

compute the residual and number of iterations required by normalsolve for each sparse system.



i.
R1 = sprandn



ii.
R2 = sprandn



iii.
R3 = sprandn














Add the normal equation approach to the appropriate locations in





May 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here