SetDirectory["X:\\V2008-01-10"]

Pd=ReadList["kontrolaHP.txt"];

FT[x_]=Fit[Pd,{1,x},x]

Faz=Table[Pd[[i]]-FT[i],{i,Length[Pd]}];

ListPlot[Faz]

PdD=ReadList["kontrolaHP_data.txt",{Number,Number,Number}];
PdR=ReadList["kontrolaHP_ref.txt",{Number,Number,Number}];

PdD[[Length[PdD]]]
PdR[[Length[PdR]-5]]

PdD[[1]]
PdR[[2]]

PDCo=Table[{PdD[[i]][[1]],PdD[[i]][[3]]},{i,Length[PdD]}];

PRCo=Table[{PdR[[i]][[1]],PdR[[i]][[3]]},{i,Length[PdR]}];

ListPlot[PDCo]

SlR=ListPlot[Table[PRCo[[i]],{i,8000}],PlotStyle->Hue[0]]

SlD=ListPlot[Table[PDCo[[i]],{i,320}],PlotStyle->Hue[0.7]]

Show[SlR,SlD]