function A=Matwright(N,u,v)
    A=zeros(2*N+1,2*N+1)
    for i=1:2*N+1
        for j=1:2*N+1
            A(i,j)=dbinom(j-1,2*N,(i-1)/(2*N)*(1-u)+(1-(i-1)/(2*N))*(1-v))
        end
    end