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

% revision history:
% 03/28/03 Mark D. Shattuck <mds> mdiv.m
% 12/13/14 mds convert to bsxfun for speed (ldiv version?)

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

