function R=tchebichev(n,T)
    R=[]
    for i=1:length(T)
        t1=1
        t2=T(i)
        for k=2:n
            temp=t2
            t2=2*T(i)*t2-t1
            t1=temp
        end
        if n==0
            R=[R,t1]
        else
            R=[R,t2]
        end
    end
endfunction
