On Matlab Let A 6 28 21 4 15 12 8 a 25 For each value of a i

On Matlab, Let A=

6 28 21

4 -15 -12

-8 a 25

For each value of a in the set {32, 31.9, 31.8,32.1,32.2} compute the characterisic polynomial of A and the eigenvalues. In each case, create a graph of the characteristic polynomial p(t)= det(A- tI) for 0 _< t _< 3 (those are less than or equal to signs). If possible, construct all graphs on one coordinate system. Describe how the graphs reveal the changes in the eigenvalues, as a changes. Can someone please advise how to code this on matlab?

Solution

clc
clear all
a = [32 31.9 31.8 32.1 32.2];

for i = 1:5
syms t
A = [6 28 21; 4 -15 -12; -8 a(i) 25];
A_eig(i,:) = eig(A)
A_minus_tI = A - t*eye(3);
p_t(i) = det(A_minus_tI);
t = 0:0.01:3;
temp(i,:) = subs(p_t(i));
end

plot(t,temp(1,:),t,temp(2,:),t,temp(3,:),t,temp(4,:),t,temp(5,:),\'linewidth\',2)

title(\'Characteristics polynomial\')
xlabel(\'t\')
ylabel(\'p(t)\')
grid on
legend(\'a = 32\',\'a = 31.9\',\'a = 31.8\',\'a = 32.1\',\'a = 32.2\')

On Matlab, Let A= 6 28 21 4 -15 -12 -8 a 25 For each value of a in the set {32, 31.9, 31.8,32.1,32.2} compute the characterisic polynomial of A and the eigenval

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site