Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Gershgorin
- A=[1 1 -1; 2 -2 0; 1 0 5]
- GerPlot(A);
- a=real(eig(A));
- plot(a,zeros(length(a),1),'X');
- fplot(@(x)polyval(poly(a),x),[-4 6]);
- axis([-4 6 -3 3]);
- function GerPlot(A)
- hold on; %fixálja a képet, arra rajzol
- for i=1:size(A,1)
- r=sum(abs(A(i,:)))-abs(A(i,i));
- t=0:pi/20:2*pi;
- x=r*cos(t)+A(i,i);
- y=r*sin(t);
- plot(x,y);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement