function W = pesosporpuntos(R)
 W = [];
 for k = 1:length(R)
  aux = 1;
  for s = [1:k-1 k+1:length(R)]
   aux = conv(aux,[1 -R(s)])/(R(k)-R(s));
  end
  W = [W diff(polyval(polyint(aux),[-1 1]))];
 endfor
endfunction
