Skip to content

Commit 8f4f2bc

Browse files
committed
More robust pvalue sorting
1 parent c64ddcf commit 8f4f2bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CanlabCore/Statistics_tools/holm_sidak.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
pthr = 1 - (1-alpha)^(1/length(sortedP)); % max P-value for sig results. Anything below this is significant.
3636

37-
while sortedP(end) < 1 - (1-alpha)^(1/length(sortedP))
37+
while ~isempty(sortedP) && sortedP(end) < 1 - (1-alpha)^(1/length(sortedP))
3838

3939
sig(argsort(end)) = true;
4040
sortedP(end) = [];

0 commit comments

Comments
 (0)