function [eigs, V, conv] = mynaiveqr(A, tol, maxit)
    [n, ~] = size(A);
    V = eye(n);
    conv = zeros(maxit, 1);
    err = 2*tol;
    iter = 0;
    while (err > tol) && (iter < maxit)
        V = A*V;
        for k = 1:n
            V(:, k) = V(:, k)/norm(V(:, k));
            for j = (k+1):n
                c = V(:, j)' * V(:, k);
                V(:, j) = V(:, j) - c* V(:, k);
            end
        end
        W = V'*A*V;
        eigs = diag(W);
        err = sum(abs(W), 'all') - sum(abs(eigs));
        iter = iter + 1;
        conv(iter) = err;
    end
    conv = conv(1:iter);
end
