clear
a=input('Vettore a: ');
a=[-1 a];
b=input('Vettore b: ');
[X,Y]=meshgrid(-5:.05:5);
[m,n]=size(X);
r=zeros(m,n);
q=r;
for i=1:m
    for j=1:n
        p=a+(X(i,j)+1i*Y(i,j))*b;
        r(i,j)=max(abs(roots(p)));
        if r(i,j)<1 
            q(i,j)=r(i,j);
        else
            q(i,j)=2;
        end
    end
end
contour(X,Y,q,1)
if q(1,1) < 1
   legend('Esterno')
else
    legend('Interno')
end
