This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 3. Write a MATLAB function P=eigbasis(A) which accepts as input an n × n matrix A and gives as output an n × n invertible matrix P whose columns are eigenvectors for A . The matrix P may have complex entries. If A is not diagonalizable then your function should give an appropriate error message. Your function should not rely on any builtin MATLAB functions for ±nding eigenvectors, such as [V,D] = eig(X) . Once again we must beware of problems with roundoF errors. Therefore you should use the program newnullbase (given on the back of the page) instead of nullbase (or rref ). Apply the function eigbasis to each of the matrices in problem 1. function B=newnullbase(A) [m,n]=size(A); [R,jb]=rref(A,10^(7)); r=length(jb); d=nr; l=zeros(1,n); l(1,jb)=ones(1,r); l=logical(l); k=~l; B=zeros(n,d); if d>0, B(l,:)=1*R(1:r,k); B(k,:)=eye(d); end...
View
Full
Document
This note was uploaded on 12/27/2011 for the course MAS 3114 taught by Professor Olson during the Fall '08 term at University of Florida.
 Fall '08
 Olson

Click to edit the document details