function average = vector_code ( n )
  p1 = rand(2,n);
  p2 = rand(2,n);
  d = vecnorm ( p1 - p2 );
  average = mean ( d );
  return
end
