% use the contrast maps and the bv difft = depcorrt(c1, bv, c2, bv); % remove invalid outcomes difft(isinf(difft) | isnan(difft)) = 0;