function [ wn ] = wnodes( nbig)
%  builds a vector with the quadrature nodes 
% gaussian quadrature with  4 nodes on each subinterval
%wn is a vector of dimension nbig
%  see formula 4.2 in page 1717 
xi=ones(1,4);
xi(1)=-0.8611363115940526;
xi(2)=-0.33998104358485626;
xi(3)=-xi(2);
xi(4)=-xi(1);
n=nbig/4;
%%% n is the number of subintervals, h is the stepsize
h=2/n;
% ti is the midpoint of the subinterval
for i=1:nbig
    ti=-1+h*(1/2+floor((i-1)/4));
    ind=mod(i-1,4)+1;
   wn(i)=ti+h/2*xi(ind);
end
end

