Answered step by step
Verified Expert Solution
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, 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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Document Format ( 2 attachments)
635d9d8ac6d64_177315.pdf
180 KBs PDF File
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