function gnew(A)
% A=[2 1 -1;-2 4 1;1 -3 20]
% A=[9 1 2;-1 14 3;-1 -5 10]
% A=[9 1 2;complex(1,-1) complex(14,9) 2;-1 5 complex(10,-5)]
% A=[5 1 -1;-2 11 1;1 -3 19]

t=0:0.1:2*pi;
[m,n]=size(A);
hold on

for i=1:size(A,1)
    % Krug sa centrom (h,k) gde h je realni deo od A(i,i) i
    % k imaginarni A(i,i)   :
    h=real(A(i,i)); 
    k=imag(A(i,i)); 

    % Racunamo poluprecnik kruga
    rr=0;
    rc=0;
    for j=1:size(A,1)
       if i ~= j 
           rr=rr+abs(A(i,j)); %za A
           rc=rc+abs(A(j,i)); %za A'
       end    
    end 
	r=min(rr,rc);
    
   
    plot( r*cos(t)+h, r*sin(t)+k ,'-');

    %crtamo centar
    plot( h, k,'+');
end

axis equal;

% crtamo sopstvene vrednosti
ev=eig(A);
for i=1:size(ev)
    rev=plot(real(ev(i)),imag(ev(i)),'ro');
end
hold off;


