Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed May 22, 2019
1 parent 7f4a9f2 commit 92be7d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SGS_varcovar.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@


%% 2. Initialization Spiral Search
x = ceil( min(covar(1).range(2)*k.wradius, nx));
y = ceil( min(covar(1).range(1)*k.wradius, ny));
x = ceil( min(covar(1).range(2)*neigh.wradius, nx));
y = ceil( min(covar(1).range(1)*neigh.wradius, ny));
[ss_Y, ss_X] = ndgrid(-y:y, -x:x);% grid{i_scale} of searching windows
ss_dist = sqrt( (ss_X/covar(1).range(2)).^2 + (ss_Y/covar(1).range(1)).^2); % find distence
ss_id_1 = find(ss_dist <= k.wradius); % filter node behind radius.
ss_id_1 = find(ss_dist <= neigh.wradius); % filter node behind radius.
rng(parm.seed_search);
ss_id_1 = ss_id_1(randperm(numel(ss_id_1)));
[~, ss_id_2] = sort(ss_dist(ss_id_1)); % sort according distence.
Expand Down
Binary file modified script_SGS.mlx
Binary file not shown.

0 comments on commit 92be7d9

Please sign in to comment.