%  Read line from table 
function [varargout] = ReadTable(Table,varargin)
  fid=fopen(Table);
  while ~feof(fid)
    tline = fgetl(fid);
    if tline(1)=='%'
        continue;
    end
    indx=1;
    for i=1:length(varargin)
      [AB{i},n,errmsg,len]=sscanf(tline(indx:end),'%s',1);
      indx=indx+len;
    end
    Hit=1;
    for i=1:length(varargin)
      if ~strcmp(char(AB{i}),char(varargin{i}))
        Hit=0;
        break;
      end
    end
    if Hit
      [L,n]=sscanf(tline(indx:end),'%f');
      for i=1:n
         varargout{i}=L(i);
      end
      break;
    end
  end
  fclose(fid);
  if ~Hit
    varargin{:}
    error('Table entry not found');
  end
end
