Question: Code in Question: n = 5000; % generate a set of n orthogonal vectors to use as eigenvectors B = rand(n, n); [Q, ~] =

 Code in Question: n = 5000; % generate a set of

Code in Question:

n = 5000;

% generate a set of n orthogonal vectors to use as eigenvectors B = rand(n, n); [Q, ~] = qr(B);

% generate a set of n eigenvalues between 1

% generate the SPD dense matrix explicitly A = Q * D * Q';

You will find on Blackboard a starter file that generates a (random) symmetric positive definite matrix of size 5000 x 5000 and computes its Cholesky factorization via the Matlab chol() function. Complete the script to: generate a random right hand-side vector b perform forward and backward passes on the factors to obtain the solution of Az = b verify the correctness of your solution by computing the norm of the residual r = Az - b. The norm of r, || Ar - b||, is not exactly zero because of rounding errors made in floating point computations but should be a small number on the order of machine precision. You will find on Blackboard a starter file that generates a (random) symmetric positive definite matrix of size 5000 x 5000 and computes its Cholesky factorization via the Matlab chol() function. Complete the script to: generate a random right hand-side vector b perform forward and backward passes on the factors to obtain the solution of Az = b verify the correctness of your solution by computing the norm of the residual r = Az - b. The norm of r, || Ar - b||, is not exactly zero because of rounding errors made in floating point computations but should be a small number on the order of machine precision

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!