Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to write a MATLAB function to implement the Hager-Higham method to estimate the condition number of the matrix A in the one-norm. This

image text in transcribed

You are to write a MATLAB function to implement the Hager-Higham method to estimate the condition number of the matrix A in the one-norm. This is explained in the notes on Canvas and in class. Your function should have the form [kappa,z,jmax]=cond1(L,U,2,A). Thus, here L, U, and p are outputs from the command (L,U,p]=lu(A,'vector'). Here kappa is the condition number k(A) = || A||1 || A-1||1, z is the vec- tor such that ||2||0o = 1, || A-Tz||0o = ||A-1||1 = || A-T||00, and jmax is a column of the identity matrix such that ||A-leimaz|| = ||A-1||1. Test your routine with the matrices generated by the m-files matrix1.m, matrix2.m, matrix3.m posted on Canvas in the MATLAB codes folder. Your code should do no more than four iterations and it should be short. You can check your answer with the MATLAB function cond. The MATLAB statement kappal = cond(A, 1) gives you the condition number in the one- norm. If A is well conditioned, your value of kappa should be close to kappal. If A is badly conditioned, they should both be very large. A possible starting vector for z could the one recommended by Higham (in the notes) or it could be the one produced from the MATLAB statements f = randn(n,1); z = form(f, Inf); where n is the dimension of A. You are to write a MATLAB function to implement the Hager-Higham method to estimate the condition number of the matrix A in the one-norm. This is explained in the notes on Canvas and in class. Your function should have the form [kappa,z,jmax]=cond1(L,U,2,A). Thus, here L, U, and p are outputs from the command (L,U,p]=lu(A,'vector'). Here kappa is the condition number k(A) = || A||1 || A-1||1, z is the vec- tor such that ||2||0o = 1, || A-Tz||0o = ||A-1||1 = || A-T||00, and jmax is a column of the identity matrix such that ||A-leimaz|| = ||A-1||1. Test your routine with the matrices generated by the m-files matrix1.m, matrix2.m, matrix3.m posted on Canvas in the MATLAB codes folder. Your code should do no more than four iterations and it should be short. You can check your answer with the MATLAB function cond. The MATLAB statement kappal = cond(A, 1) gives you the condition number in the one- norm. If A is well conditioned, your value of kappa should be close to kappal. If A is badly conditioned, they should both be very large. A possible starting vector for z could the one recommended by Higham (in the notes) or it could be the one produced from the MATLAB statements f = randn(n,1); z = form(f, Inf); where n is the dimension of A

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 Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

What are the main objectives of Inventory ?

Answered: 1 week ago

Question

Explain the various inventory management techniques in detail.

Answered: 1 week ago