function t2=transfix2(t1,fac);
% subtract a linear trend, using first point
% by the trend (normalized by the first point of the trend)
x=1:length(t1);
ysub=(x/length(t1))*fac;
t2=t1(:)-ysub(:);
