% PADCOLS: Given two matrices, pads the narrower one with columns of zeros.
%
%     Usage:  [A,B] = padcols(A,B)
%

% RE Strauss, 6/8/93

function [A,B] = padcols(A,B)
   [ra,ca] = size(A);
   [rb,cb] = size(B);

   if (ca < cb)            % A narrower than B
      A = [A, zeros(ra,(cb-ca))];
   end;

   if (ca > cb)            % B narrower than A
      B = [B, zeros(rb,(ca-cb))];
   end;
   return;
