   function B = givensApp(A,i,j,c,s,side)
%% function B = givensApp(A,i,j,c,s,side)  
%% applies G to left if side = 'left'
%% applies G' to right if side = 'right'
     B = A;
     sc = conj(s);
  if (strcmp(side,'left'))
    B(i,:) = c*A(i,:) + sc * A(j,:);
    B(j,:) =-s*A(i,:) + c * A(j,:);    
  else
    B(:,i) = c*A(:,i) + s*A(:,j);
    B(:,j) = -sc*A(:,i) + c*A(:,j);
  end
