%  Convert to a mass transfer property table 
function [mat2 mat1] = MassTable(varargin)
  [mat1,Do,To]=varargin{1:3};
  if length(varargin)==4
    Pr=varargin{4};
    mat1=GasPres(mat1,Pr);                % alter table for Pr (atm)
    Do=Do/Pr;                             % alter Do for Pr (atm)
  end
  mat2=mat1;
  if (mat2(1,5)/mat2(1,4)-1 > 0.01)       % gas
    mat2(:,2)=mat1(:,2)./mat1(:,3);
    mult=Do/prop('k',mat2,To);
    mat2(:,2)=mult*mat2(:,2);             % k -> DAB
  else                                    % liquid
    mult=Do*prop('mu',mat1,To)/To;
    mat2(:,2)=mult.*mat1(:,1)./mat1(:,6); % k -> DAB
  end
  mat2(:,4)=1./mat1(:,3);                 % Cp -> 1/den
  mat2(:,5)=mat2(:,4);                    % Cv -> 1/den
end
