Commit e644f2f4 authored by Riccardo La Placa's avatar Riccardo La Placa
Browse files

Cut some old comments; added distance metric during the creation of the...

Cut some old comments; added distance metric during the creation of the nearest neighbour searcher (right now this part is commented, see lines 357-361).
parent 7ea4999c
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -218,11 +218,8 @@ tic
%end

% Try s* and check \nu_s range
g_jj=((pi*Tseg)^2)/3.*[1; (Tseg^2)/60; (Tseg^3)/1344; (Tseg^4)/172800]; %eq. 22 M2015 + calcoli da eq. 21 M2015
g_jj=((pi*Tseg)^2)/3.*[1; (Tseg^2)/60; (Tseg^4)/1344; (Tseg^6)/172800]; %eq. 22 M2015 + calcoli da eq. 21 M2015
mu_s=0.1; %massimo mismatch sulla griglia coerente da scegliere
%% Troppo alto μ ma non abbiamo RAM adesso
%% Magari spezzare a blocchi i nibank e poi cercare la minima distanza 
%% in ciascuno?
%s_s=uint8(4);
s_s = 4;
while(1)
@@ -358,13 +355,16 @@ end

tic
nisearcher = KDTreeSearcher(nibank,'BucketSize',100);
%% The line above will have to be substituted with something along the lines
%% of the ones below to account for the metric g_jj in the phase derivatives
% gdistance = @(a,b)sqrt(((a-b).^2)*(g_jj(1:s_s)));
% nisearcher = ExhaustiveSearcher(nibank,'Distance',@gdistance);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% parbank = combinations(f_gr,porb_gr,a_gr,tasc_gr).Variables;
parbank = combinations(porb_gr,a_gr,tasc_gr).Variables;
bestpar = zeros(1,5);
toc
%% Find out how to search for nearest neighbour while keeping one par. fixed

tic
for n=1:length(f_gr)
    for i=1:length(parbank)