TempExactFun = @(time)14.6*exp(-1.1*time);
timeMeasured = linspace(0,2,41);
TempMeasured = round(TempExactFun(timeMeasured));
time=0.7
exact=TempExactFun(time)
TempLinear=interp1(timeMeasured,TempMeasured,time)
TempSpline=spline(timeMeasured,TempMeasured,time)
time=5
exact=TempExactFun(time)
TempLinear=interp1(timeMeasured,TempMeasured,time,'linear','extrap')
TempSpline=spline(timeMeasured,TempMeasured,time)
timePlot=linspace(0,2,200);
TempExactPlot=TempExactFun(timePlot);
TempLinearPlot=interp1(timeMeasured,TempMeasured,timePlot);
TempSplinePlot=spline(timeMeasured,TempMeasured,timePlot);
plot(timePlot,TempExactPlot,'--k',...
    timeMeasured,TempMeasured,'ok',...
    timePlot,TempLinearPlot,'r',...
    timePlot,TempSplinePlot,'b')