function c=msum(a,b)
% msum <Exterior matrix sum>
% Usage:: c=msum(a,b[a])
%
% c=msum(a,b) forms matrix c(n,m)=a(n)/b(m)

% revision history:
% 03/28/03 Mark D. Shattuck <mds> msum.m
% 12/13/14 mds convert to bsxfun for speed

if(nargin==1)
  c=bsxfun(@plus,a,a');
else
  c=bsxfun(@plus,a,b');
end

