Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago