%-------------------------------------------------------------------------%
%
% File: getPts(pointType,N)
%
% Goal: returns a set of points
%
% Inputs:  pointType:    the type of points
%          N:            number of points 
%
% Outputs: x:   the specified set of points
%
% Calls on: haltonseq: by D. Dougherty, from MATLAB Central File Exchange
%
%-------------------------------------------------------------------------%
function x = getPts(pointType,N)
switch pointType
    case 'halton'
        x = haltonseq(N,2);
    case 'rand'
        x = rand(N,2); 
    case 'grid'
        x1 = linspace(0,1,N);
        x2 = linspace(0,1,N);
        [xp1 xp2] = meshgrid(x1,x2);
        x = [xp1(:) xp2(:)];
    otherwise
        error(['Point type "' pointType '" not available'])
end
