%% Roots of Unity
% Express the solutions to the equation x^7=1 as the roots of a polynomial. Plot the roots in the complex plane.

pp = [1 0 0 0 0 0 0 -1];
zplane(pp,1)

%
% Scale the roots of p in and out of the unit circle. Plot the results.

hold on

for sc = [1:-0.2:0.2 1.2 1.4];
    b = polyscale(pp,sc);
    plot(roots(b),'o')
end

axis([-1 1 -1 1]*1.5)

hold off

% Copyright 2012 The MathWorks, Inc.