function inel = inverse(G,multab)
%
% The inverse of group element I is calculated and stored in inel(I).
%
fid = fopen('Irrepres.m', 'a');
inel = zeros(1,G);
for I = 1:G
  if inel(I) == 0
    for J = 1:G
      if multab(I,J) == 1
        inel(I) = J;
        inel(J) = I;
        break;
      end
    end
  end
end
for I = 1:G
  if inel(I) == 0
    fprintf(fid, 'No inverse element for group element', I);
    fprintf(fid, '\n\n');
  end
end
fclose(fid);
return