%  Create a thermal property table 
function dat = mat(varargin)
  I=length(varargin);
  for i=1:2:I
    flag=varargin{i};
    switch flag(1)
      case 'T'                       % temperature
        dat(:,1)=varargin{i+1}(:)';
      case 'k'                       % thermal conductivity
        dat(:,2)=varargin{i+1}(:)';
        k=varargin{i+1};
      case 'd'                       % density
        dat(:,3)=varargin{i+1}(:)';
      case 'C'
        switch flag(2)
          case 'p'                   % specific heat at constant pressure
            dat(:,4)=varargin{i+1}(:)';
          case 'v'                   % specific heat at constant volume
            dat(:,5)=varargin{i+1}(:)';
        end
      case 'm'                       % dynamic viscosity
        dat(:,6)=varargin{i+1}(:)';
      case 'e'                       % thermal expansion coefficient
        dat(:,7)=varargin{i+1}(:)';
    end
  end
end
