Question: In class we saw that the computation time can be calculated using Matlab's ticandtoecommands (see the demoTicToc. m). The purpose of this assignment is to

 In class we saw that the computation time can be calculated

In class we saw that the computation time can be calculated using Matlab's ticandtoecommands (see the demoTicToc. m). The purpose of this assignment is to investigate the actual computation time for Gaussian elimination for a number of different types of matrices and compare this to theoretical results discussed in lectures. These matrices are as follows: AnNtimesNrandom matrix AnNtimesNrandom, diagonally-dominant matrix AnNtimesNrandom, upper triangular matrix AnNtimesNtridiagonal matrix AnNtimesNtridiagonal matrix stored as a sparse array Code for generating these matrices is given in the fileMatrices. m. Detailed instructions are as follows: bulletChoose an appropriate number of trials and set of values for N. bulletFor each matrix, compute the the average time taken T_avg(N) and plot the data points (log(N), log(T_avg(N))). bulletYou should find that the data follows roughly a straight line. Perform a linear fit of the data and find the slope of the line. bulletFor matrices 1., 2. and 3., discuss how this value relates to theoretical results on 'flop counts'discussed in the lectures. Your conclusions should be explained in a one-page report. In class we saw that the computation time can be calculated using Matlab's ticandtoecommands (see the demoTicToc. m). The purpose of this assignment is to investigate the actual computation time for Gaussian elimination for a number of different types of matrices and compare this to theoretical results discussed in lectures. These matrices are as follows: AnNtimesNrandom matrix AnNtimesNrandom, diagonally-dominant matrix AnNtimesNrandom, upper triangular matrix AnNtimesNtridiagonal matrix AnNtimesNtridiagonal matrix stored as a sparse array Code for generating these matrices is given in the fileMatrices. m. Detailed instructions are as follows: bulletChoose an appropriate number of trials and set of values for N. bulletFor each matrix, compute the the average time taken T_avg(N) and plot the data points (log(N), log(T_avg(N))). bulletYou should find that the data follows roughly a straight line. Perform a linear fit of the data and find the slope of the line. bulletFor matrices 1., 2. and 3., discuss how this value relates to theoretical results on 'flop counts'discussed in the lectures. Your conclusions should be explained in a one-page report

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!