yeatmanlab / AFQ

Automated Fiber Quantification
75 stars 52 forks source link

Added correction for cases when significant pvals are located at ends of thresholded-pvals vector #3

Closed mick-d closed 10 years ago

mick-d commented 10 years ago

An error is generated when a cluster is the size of the whole tract for one of the permutation ii. This is because in this case clusEnd = find(pThresh(ii,:) == 0) and thus clusSiz = diff(clusEnd) are empty and therefore max(clusSiz) generates an error.

A possible correction is to set the maximum cluster size to the size of the tract in such a case: clusMax(ii) = size(pThresh(ii,:),2)