function channels=H_interplinear_w(pilotin)
rate=8;
len_pilot=length(pilotin);
tmp=zeros(10,1);
for m=1:len_pilot,
    if m==1
            for i=1:(rate-1)
                channels1(i)=pilotin(1)-(pilotin(2)-pilotin(1))*(rate-i)/rate;
            end
    else 
            for i=1:(rate-1),
                channels1((m-1)*(rate-1)+i)=(pilotin(m)-pilotin(m-1))*i/rate+pilotin(m-1);
            end
    end
end
len_pilot=length(pilotin);
rate=8;
N=rate*len_pilot/30;
od=zeros(length(pilotin),1);
fake_pilot=pilotin(1)-(pilotin(2)-pilotin(1)); % create pilotin(0) according to other pilots by linear for the purpose of 1st interp
for m=1:len_pilot,
    if m==1
        for i=1:(rate-1) 
            a=i/N;
            c1=a*(a-1)/2;
            c0=-(a-1)*(a+1);
            c_1=a*(a+1)/2;
            channels2(i)=c0*fake_pilot+c_1*pilotin(1);
        end
    elseif m==2
         for i=1:(rate-1) 
            a=i/N;
            c1=a*(a-1)/2;
            c0=-(a-1)*(a+1);
            c_1=a*(a+1)/2;
            channels2((m-1)*(rate-1)+i)=c1*fake_pilot+c0*pilotin(1)+c_1*pilotin(2);
        end
    else
        for i=1:(rate-1),
             a=i/N;
             c1=a*(a-1)/2;
             c0=-(a-1)*(a+1);
             c_1=a*(a+1)/2;
             channels2((m-1)*(rate-1)+i)=c1*pilotin(m-2)+c0*pilotin(m-1)+c_1*pilotin(m);
         end
     end
 end
%   outdata(45:49)=tmp(1:5);
%    outdata(1:5)=tmp(6:10);
channels=channels2;
channels(1:14)=channels1(1:14);
channels=conj(channels);

