function [Q,R,E]=qr(x)
% [Q,R,E]=qr(x)
% qr decomposition

%       S.Halevy 7/31/92
%       Copyright (c) 1992 by the MathWizards

if nargout > 2
   %disp('WARNING: MathViews QR is only partially implemented')
   %pause
   [Q,R,E]= _qr(x);
   R=triu(R);
else
   [Q,R]= _qr(x);
   R=triu(R);
end
