Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) Write a well-commented MATLAB function program mysolvecheck with input a number n that makes a random n x n matrix A and a random

image text in transcribed

(a) Write a well-commented MATLAB function program mysolvecheck with input a number n that makes a random n x n matrix A and a random vector b, solves the linear system Ax = b, calculates the scalar residual r = || Ax b||, and outputs that number as r. (b) Write a well-commented MATLAB script program that calls mysolvecheck 10 times each for n = 5, 10, 20, 40, 80, and 160, then records and averages the results and makes a log-log plot of the average r vs. n. Once your program is running correctly, increase the maximum n (by factors of 2) until the program stops running within 5 minutes

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

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

Methods of Delivery Guidelines for

Answered: 1 week ago