function e = emfJtype(T)
% emfJtype  EMF of J type thermocouple as function of temperature
%
% Synopsis:  e = emfJtype(T)
%
% Input:  T = temperature, degrees C
%
% Output: e = thermocouple emf in Volts

% --- Range check:  correlation is valid only for -210 <= T < 760
ibad = [find(T<-210), find(T>760)];
if ~isempty(ibad)
  error(sprintf('T = %g is out of range:  -210 <= T <= 760 C\n',T(ibad)));
end
% --- Assign constants and calculate emf in volts
c = [1.5631725697e-20  -1.2538395336e-16  2.0948090697e-13   -1.7052958337e-10 ...
     1.3228095295e-7  -8.5681065720e-5   3.0475836930e-2  50.381187815  0];
e = polyval(c,T)*1e-6;
