Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finish the following MATLAB function program: function [x1, r1, x2, r2] % Solves linear systems using the LU decomposition with pivoting % and also

Finish the following MATLAB function program: =function [x1, ri, x2, r2] mysolve (A,b) % Solves linear systems using the LU 

Finish the following MATLAB function program: function [x1, r1, x2, r2] % Solves linear systems using the LU decomposition with pivoting % and also with the built -in solve function A\b. % Inputs: A % mysolve (A, b) %3D the matrix -- b the right-hand vector the solution using the LU method the norm of the residual using the LU method -- % Outputs : x1 -- r1 -- x2 the solution using the built -in method the norm of the residual using the r2 built -in method Using format long, test the program on both random matrices (randn (n,n)) and Hilbert matrices (hilb(n)) with n large (as big as you can make it and the program still run). Print your program and summarize your observations. (Do not print any random matrices or vectors.)

Step by Step Solution

3.48 Rating (165 Votes )

There are 3 Steps involved in it

Step: 1

Implementation of mysolve function clearvars For testing mysolve funtio... 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

Document Format ( 2 attachments)

PDF file Icon
635d9d8ac6d64_177315.pdf

180 KBs PDF File

Word file Icon
635d9d8ac6d64_177315.docx

120 KBs Word File

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

Linear Algebra with Applications

Authors: Steven J. Leon

7th edition

131857851, 978-0131857858

More Books

Students also viewed these Accounting questions

Question

BPR always involves automation. Group of answer choices True False

Answered: 1 week ago

Question

Show that if A is singular then adj A is also singular.

Answered: 1 week ago