% PADROWS: Given two matrices, pads the shorter one with rows of NaN's.
%
%     Syntax:  [A,B] = padrows(A,B)
%

% RE Strauss, 6/8/93
%   2/28/03 - pad with NaN's rather than zeros.

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

   if (ra < rb)            % A shorter than B
      A = [A; NaN*ones((rb-ra),ca)];
   end;

   if (ra > rb)            % B shorter than A
      B = [B; NaN*ones((ra-rb),cb)];
   end;
   return;
