%% Hessenbergův tvar matice pomocí Givensovy rotace

format short
Ap=randi([-5 5],5);

%

function G=GRM(x)
% function G=GRM(x)
% Givens rotation matrix for x of size 2x1,
% Gx=ce_1
r=norm(x);
if r==0
    G=Nan;
    return
end
c=x(1)/r;
s=-x(2)/r;
G=[c -s;s c];
end