function [e] = Thermistor(T) R0 = 2000; % resistance of thermistor R = 1000 * exp( 3905/(T+273) - 3905/298 ); e = R - R0; end