-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbs_set_p_range.m
28 lines (25 loc) · 1.34 KB
/
dbs_set_p_range.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function a = dbs_set_p_range
% DBS_SET_P_RANGE Set a range of the initial cluster-forming threshold p-value to be tested
% ================================================================================================================
% [ OUTPUTS ]
% a.p.lb = lower boundary of the range, p-value = 0.05.
% a.p.hb = higher boundary of the range, p-value = 0.0001.
% a.p.range = the range between a.p.lb and a.p.hb
% ----------------------------------------------------------------------------------------------------------------
% Last update: Aug 30, 2016.
%
% Copyright 2016. Kwangsun Yoo (K Yoo), PhD
% E-mail: [email protected] / [email protected]
% Laboratory for Cognitive Neuroscience and NeuroImaging (CNI)
% Department of Bio and Brain Engineering
% Korea Advanced Instititue of Science and Technology (KAIST)
% Daejeon, Republic of Korea
% ================================================================================================================
a.p.lb = 0.05; % lower boundary
a.p.hb = 0.0001; % higher boundary
log10p.lb = log10(a.p.lb);
log10p.hb = log10(a.p.hb);
log10p.range = [ log10(a.p.lb) : -0.1 : log10(a.p.hb)-0.1 ]';
temp1 = 10000 * (10.^(log10p.range));
temp2 = 10000 * [ a.p.lb : -0.005 : a.p.hb ]';
a.p.range = flipud(union(round(temp1), round(temp2)))/10000;