function PSet4Q3_q

N = 50;
tol = 1e-5;

% *** ENTER TRUE SOLUTIONS ***
r1 = ???
r2 = ???
r3 = ???

% generates N equally spaced points between -5 and 5
xv = linspace(-5,5,N);
yv = linspace(-5,5,N);

% loop through various starting values for x and y
for ix = 1:length(xv)
    for iy = 1:length(yv)
        x = xv(ix);
        y = yv(iy);
        z = [x;y];
        
        % *** WRITE CODE FOR NEWTON ITERATION *** 
        ???
        
        % color starting points according to the solution they find
        if norm(z-r1) < tol
            c = 'r';
        elseif norm(z-r2) < tol
            c = 'b';
        elseif norm(z-r3) < tol
            c = 'g';
        else
            c = 'k';
        end;
        figure(1)
        plot(x,y,'.','color',c,'MarkerSize',20);
        hold on
    end;
end;
            