clear;
n=100;

    disp('Problem size')
    [n]
    
    %% This routine generates the example, for the 
    % function which will compute all the eigenvalues of the 
    % presented function
    
    disp('Generate the problem matrix')
    struc='rs';
    type='u'; % random Givens vec.
    [G,R,H]=GENTESTMAT(n,struc,type);
    
    % Compute the result via matlab
    % only need the first column
    [V,D,conds]=condeig(H);
    ev=diag(D);
    
    % Assign some parameters for both routines
    defcrit=10^(-9);
    
    % Compute the eigenvalues via the QR-method
    disp('Start eigenvalue computation with QR')

    time1=cputime;
    [eigcomp,Giter]=HLMEIG(G,R,struc,2,defcrit,10^(-3),'rel','wl');
    time2=cputime;

    
    % Please note that for complex eigenvalues, matlab can sort
    % in a wrong way
    sort(eigcomp)-sort(ev)
