% **************************************************************
% * MATLAB FRAMEWORK CAP DISCREPANCY:                          *
% *                                                            *
% *   AUTHOR    : Holger Heitsch                               *
% *   INSTITUTE : WIAS Berlin                                  *
% *   (C)       : 2020                                         *
% *                                                            *
% **************************************************************

% **************************************************************
%
%   EXAMPLE SCRIPT
%
% **************************************************************


% setup example points

n = 3;   % space dimension
N = 10;  % number of samples on sphere

X = [
  -0.948870813595097   0.152761487884626   0.276239220471414
   0.070599758920517  -0.142213910429636   0.987314984045455
   0.827869962973144   0.230255216346612  -0.511482022902095
  -0.703522981003567   0.477894708853281   0.525996257068330
  -0.121512241448534   0.722936234835414   0.680145554672049
   0.359406313659387  -0.828751511699082  -0.428949919638945
  -0.753041476485011  -0.657958639351202  -0.004354721161043
  -0.011276624328861  -0.859730712560357   0.510623089591732
   0.160582558120060   0.388597970063933   0.907306375867495
  -0.726345401484894  -0.020193324360066   0.687033177796412
]';


% compute cap discrepancy for given samples

[D, w, t, time] = cdiscr (X);

% display results

D, w, t, time
