function [SigValue] = sig_value(signif,cormatrx) %finds the smallest of the correlations in the cormatrx that is %significant at the 0.05 level. list=ones((length(signif(:,1))*length(signif(1,:))),1); k=1; for i=1:length(signif(:,1)) for j=1:length(signif(1,:)) if signif(i,j)<=0.05 list(k,1) = list(k,1) - 1 + abs(cormatrx(i,j)); k=k+1; end end end SigValue = min(list(:,1)); end