function [a1cmp] = ortc(a1)
%
% [A1CMP] = ORTC(A1) produces an orthgonal complement of a column
%         type matrix via QR decomposition.
%

% R. Y. Chiang & M. G. Safonov 7/85
% Copyright (c) 1988 by the MathWorks, Inc.
% All Rights Reserved.
% ----------------------------------------------------------------
%
[ra1,ca1] = size(a1);
if ra1 == ca1
     a1cmp = zeros(ra1);
else
     [u,r] = qr(a1);
     a1cmp = u(:,ca1+1:ra1);
end
%
% ----- End of ORTC.M ---- RYC/MGS 7/85 %