Skip to content

Commit

Permalink
More space fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholst committed Dec 21, 2018
1 parent 4756faa commit cbe22c3
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions swe_cp_WB.m
Original file line number Diff line number Diff line change
Expand Up @@ -2324,31 +2324,31 @@ function swe_cp_WB(SwE)
% Convert P values.
switch dof_type
case 1
error('degrees of freedom type still not implemented for the WB')
error('degrees of freedom type still not implemented for the WB')

case 2
CovcCovBc = 0;
for g = 1:nGr
CovcCovBc = CovcCovBc + Wg_2{g} * swe_vechCovVechV(Cov_vis(SwE.WB.iGr_Cov_vis_g==g,:), dofMat{g}, 1);
end
if (SwE.WB.stat == 'T')
edf = 2 * cCovBc.^2 ./ CovcCovBc - 2;
else
edf = 2 * (sum(swe_duplication_matrix(nSizeCon), 1) * cCovBc).^2 ./ CovcCovBc - 2;
end
CovcCovBc = 0;
for g = 1:nGr
CovcCovBc = CovcCovBc + Wg_2{g} * swe_vechCovVechV(Cov_vis(SwE.WB.iGr_Cov_vis_g==g,:), dofMat{g}, 1);
end
if (SwE.WB.stat == 'T')
edf = 2 * cCovBc.^2 ./ CovcCovBc - 2;
else
edf = 2 * (sum(swe_duplication_matrix(nSizeCon), 1) * cCovBc).^2 ./ CovcCovBc - 2;
end

case 3
CovcCovBc = 0;
for g = 1:nGr
CovcCovBc = CovcCovBc + Wg_3{g} * swe_vechCovVechV(Cov_vis(SwE.WB.iGr_Cov_vis_g==g,:), dofMat{g}, 2);
end
if (SwE.WB.stat == 'T')
edf = 2 * cCovBc.^2 ./ CovcCovBc;
else
tmp = eye(nSizeCon);
edf = (sum(swe_duplication_matrix(nSizeCon), 1) * cCovBc.^2 +...
(tmp(:)' * swe_duplication_matrix(nSizeCon) * cCovBc).^2) ./ CovcCovBc;
end
CovcCovBc = 0;
for g = 1:nGr
CovcCovBc = CovcCovBc + Wg_3{g} * swe_vechCovVechV(Cov_vis(SwE.WB.iGr_Cov_vis_g==g,:), dofMat{g}, 2);
end
if (SwE.WB.stat == 'T')
edf = 2 * cCovBc.^2 ./ CovcCovBc;
else
tmp = eye(nSizeCon);
edf = (sum(swe_duplication_matrix(nSizeCon), 1) * cCovBc.^2 +...
(tmp(:)' * swe_duplication_matrix(nSizeCon) * cCovBc).^2) ./ CovcCovBc;
end
end

% P values and activated voxels (if clusterwise).
Expand Down

0 comments on commit cbe22c3

Please sign in to comment.