Question: a) Implement your own MATLAB versions of Gauss-Seide method, steepest gra dient descent ad conjugate gradient for the resolution of a general system Ax b
a) Implement your own MATLAB versions of Gauss-Seide method, steepest gra dient descent ad conjugate gradient for the resolution of a general system Ax b with square symmetric positive definite matrix A and vector b b) Consider the following n n matrices: 3 0 rL 3 Justify that for al n, An is diagonally dominant and symmetric positive definite. For n = 3, , 250, compute the conditioning number of An with MATLAB cond function and plot the result as a function of n. What do you observe? c) For n = 100 ano vector b = (1,1, , 1)T, using the same initialization by the zero vector for each method, compare the different speed of convergence of the three mlethods by plotting the relative residuals llAx(k)-2/lblla along the iterations d) Repeat the experiment with different values of n. For each n, choose multiple random vectors b and report the average number of iterations that each method needs to reach a relative residual smaller than 10-5 d) (extra credit) Consider the Hilbert matrix Hn with coefficients hij-1/ (i+)-1) for i,j = 1, , n. Using MATLAB functions hilb and cond, compute and plot in log scale the condition numbers K2(Hn) for increasing value of n. What can you say on linear systems involving such matrices? Experiment the previous iterative methods to solve linear systems with some matrices Hn (you can take a value of n between 10 and 15 for example) and comment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
