syms w;

W = [1 1 1 1 1; 
  1 w w^2 w^3 w^4; 
  1 w^2 w^4 w w^3; 
  1 w^3 w w^4 w^2; 
  1 w^4 w^3 w^2 w];

M4 = [];
M2 = [];

% compute the 4x4 minors
for j = 1:5
    for k = 1:5
        M4 = [M4; det(W([1:j-1,j+1:5],[1:k-1,k+1:5]))];
    end;
end;

% compute the 2x2 minors
for j1 = 1:5
    for j2 = j1+1:5
        for k1 = 1:5
            for k2 = k1+1:5
                M2 = [M2; det(W([j1,j2],[k1,k2]))];
            end;
        end;
    end;
end;

disp(['Minimum for 4x4 minors: ',num2str(min(abs(double(vpa(subs(M4,w,exp(2*pi*1i/5)))))),5)]);
disp(['Minimum for 2x2 minors: ',num2str(min(abs(double(vpa(subs(M2,w,exp(2*pi*1i/5)))))),5)]);