Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedUsing 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

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

Students also viewed these Databases questions