load cartlam.dat
x=cartlam(:,1);
y=cartlam(:,2);
xn=10:0.01:80;
c1=polyfit(x,y,1);
y1=polyval(c1,xn);
plot(x,y,'.k',xn,y1,'--g')
xlabel('Temperatura (grade Celsius)')
ylabel('Variatia lungimii de unda (nm)')
grid
gtext('Puncte experimentale') 
gtext('Curba fitata')
 
