close all
clear all 
% Define the number of Halton data in the unit square 
N = 4225; 
NType = 'halton';                       % type of data points
evalPointType = 'grid';                 % type of evaluation points
cellPointType = 'grid';                 % type of PU centres
rbfType = 'gauss';                      % type of RBF
fType = 'franke';                       % type of test function           
% Inputs
wf = @(e,r) r.^4.*(5*spones(r)-4*r);    % weight for global Shepard PU
rbf = getRbf23(rbfType);                % define the RBF
testfunction = getTestF23(fType);       % define the test function
tol = 1e-14;                            % define the tolerance(for Lanczos)
ep = 0.01;                              % define the shape parameter
epw = 0.01;                             % shape parameter for local weight
% Parameter for npu-by-npu grid of evaluation points
npu = floor((N./(4))^(1/2));
% Parameter for neval-by-neval grid of evaluation points
neval = 40; 
% Define the evaluation points
epoints = getPts(evalPointType,neval);     
% Define the PU centres
puctrs = getPts(cellPointType,npu);
% Define the nodes
dsites = getPts(NType,N);
% Compute the stable WSVD-PU interpolant
WSVD_PU(dsites,rbf,wf,ep,epw,testfunction,epoints,puctrs,tol);