Question: Using Julia or Jupyter Language please. 5. # The Tridiagonal matrix type invokes a specialized algorithm for solving a linear system. (a) Set n=1000 and

Using Julia or Jupyter Language please. 5. \# The Tridiagonal matrix typeUsing Julia or Jupyter Language please.

5. \# The Tridiagonal matrix type invokes a specialized algorithm for solving a linear system. (a) Set n=1000 and t=0. In a loop that runs 50 times, generate a linear system via A=triu(tril(rand(n,n),1),1)b=ones(n) Using @elapsed, increment t by the time it takes to perform A\b. Print out the final value of t. (b) Repeat the experiment of part (a), but generate the matrix via What is the ratio of running times for part (a) and (b)? (c) Now perform the experiment of part (b) for n=1000,1200,1400,,3000, keeping the total time for each value of n in a vector. Plot running time as a function of n on a log-log scale. Is the time most like O(n),O(n2), or O(n3) ? (If the answer is unclear, try increasing the number of solves per value of n to 100 or more.)

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!