Question: 5. Let's check timing information on different algorithms - the text's routine uptrbk (which is on my web site for download) and the built-in backslash
5. Let's check timing information on different algorithms - the text's routine uptrbk (which is on my web site for download) and the built-in backslash command. First, build a random 1000 1000 system: A = rand (1000, 1000); B rand (1000,1); To get timing information, use the cputime command: z1 = cputime ; X1 = uptrbk (A , B); z2 = cputime ; z2-z1 Do the same thing using the backslash command (call the solution X2) and compare the times. Clearly, the MATLAB command is much more efficient. Finally, display norm(X1-X2) to see that the 2 algorithms give essentially the same answer. Submit a copy of your script file (but not a copy of uptrbk), the 2 CPU times and the normm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
