function testTtemp
% testTtemp  Verify e = f(T) and T = g(e) routines for T type thermocouples

%  Use two round-trip tests.  e -> T -> e2, and T -> e -> T2

% --- Specify e, compute T, then reverse to get e2
e = linspace(-5.600,20.800,1000)*1e-3;    %  range of emf values
T = Ttemp(e);
e2 = emfTtype(T);
fprintf('norm(e-e2,inf) = %g\n',norm(e-e2,inf));
plot(e,e-e2,'.');
xlabel('e  (V)');   ylabel('Error:  e-e2  (V)');


% --- Check in reverse:
%     Specify T, compute e, then reverse to get T2
T = linspace(-199.9,399.9,1000);    %  range of T values
e = emfTtype(T);
T2 = Ttemp(e);
fprintf('norm(T-T2,inf) = %g\n',norm(T-T2,inf));
figure
plot(T,T-T2,'.');
xlabel('T  (C)');   ylabel('Error:  T-T2  (C)');
