-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.m
19 lines (14 loc) · 787 Bytes
/
demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
% add Fast Gauss Transform path (change to your local directory)
% addpath(genpath('FGT'));
tic
N = size(data,1);
sigma = 0.5; % the choice of sigma depends on the dataset
q = ones(1,N); % weight for each point, set to 1 as default
epsilon = 1e-4; % tolerance for the accuracy of Gauss Transform approximation
density = figtree( data', sigma, q, data', epsilon)/N; % density is the color used in scatter plot
% visulaization
scatter3(data(:,1),data(:,2), data(:,3), 1, density, '.');
colormap(hot);
set(gca,'Color','k') % the background should be black for the hot colormap
axis equal, axis square
toc