close all
clear all

VoltageIn =  [ 0.11 0.39 1.12 1.87 2.62 3.33 3.98 4.60 5.21 5.82 6.43 7.05 7.71 8.42 9.16 9.90];
VoltageOut = [ 0.11 0.38 1.06 1.74 2.42 3.10 3.78 4.46 5.14 5.82 6.50 7.18 7.86 8.54 9.22 9.90];





[p,S] = polyfit(VoltageIn,VoltageOut,5);
x = 0:.1:10;

f = polyval(p,x);

f1 = polyval(p,VoltageIn);

f = p(6)+p(5).*x+p(4).*x.^2+p(3).*x.^3+p(2)*x.^4+p(1)*x.^5;

figure
plot(VoltageIn,VoltageOut,x,f,[VoltageIn(1) VoltageIn(end)],[VoltageOut(1) VoltageOut(end)])

















 





