Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Computational linear algebra and Matlab. Thank you for the help! Part II. Eigenvectors & Diagonalization Difficulty: Hard Exercise 2 (6 points) In this exercise, you

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Computational linear algebra and Matlab. Thank you for the help!

Part II. Eigenvectors & Diagonalization Difficulty: Hard Exercise 2 (6 points) In this exercise, you will, first, find all eigenvalues of a given nxn matrix A. Then you will take each distinct eigenvalue and find a "rational" basis for the corresponding eigenspace and the dimension of that eigenspace. Then, you will decide whether A is diagonalizable by applying the general theory. If the matrix A is diagonalizable, the output has to contain an invertible matrix P and the diagonal matrix D, such that, A PDP, or, equivalently, AP PD **Create a function in MATLAB: function []-eigen(A) Your function eigen(A) should have a set of commands which will generate the following outputs for an nxn matrix A (each output has to be supplied with the corresponding message - you could use the commands disp and fprintf) **Find and output a row vector L of all eigenvalues each eigenvalue repeats as many times as its multiplicity. You should also use closetozeroroundoff function (the code is below) to ensure that a zero eigenvalue will show as a 0 A basic MATLAB command for this part is eig(A) which returns a column vector of all eigenvalues of A and you will use the function transpose to get a row vector. You will also need to sort the entries of L to ensure that your diagonalization will be constructed properly use the MATLAB command sort to output the entries of L in ascending order) **Output a row vector M of all distinct eigenvalues (no repetition is allowed). The MATLAB command unique can be used here (see help unique) Part II. Eigenvectors & Diagonalization Difficulty: Hard Exercise 2 (6 points) In this exercise, you will, first, find all eigenvalues of a given nxn matrix A. Then you will take each distinct eigenvalue and find a "rational" basis for the corresponding eigenspace and the dimension of that eigenspace. Then, you will decide whether A is diagonalizable by applying the general theory. If the matrix A is diagonalizable, the output has to contain an invertible matrix P and the diagonal matrix D, such that, A PDP, or, equivalently, AP PD **Create a function in MATLAB: function []-eigen(A) Your function eigen(A) should have a set of commands which will generate the following outputs for an nxn matrix A (each output has to be supplied with the corresponding message - you could use the commands disp and fprintf) **Find and output a row vector L of all eigenvalues each eigenvalue repeats as many times as its multiplicity. You should also use closetozeroroundoff function (the code is below) to ensure that a zero eigenvalue will show as a 0 A basic MATLAB command for this part is eig(A) which returns a column vector of all eigenvalues of A and you will use the function transpose to get a row vector. You will also need to sort the entries of L to ensure that your diagonalization will be constructed properly use the MATLAB command sort to output the entries of L in ascending order) **Output a row vector M of all distinct eigenvalues (no repetition is allowed). The MATLAB command unique can be used here (see help unique)

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

More Books

Students also viewed these Databases questions