function p = square_uniform ( n ) %% SQUARE_UNIFORM returns sample points from the unit square. % % Discussion: % % This routine returns N points sampled uniformly at random % from within the unit square. % % Modified: % % 24 May 2006 % % Author: % % John Burkardt % % Parameters: % % Input, integer N, the number of points to generate. % % Output, real P(N,2), the sample points. % p(1:n,1:2) = rand(n,2);