嗨,吉娜,
我猜你想沿着缺失的四维数据重复二进制掩码,对吧?
一种可能是:
Mask4d = repmat(mask, 1,1,1, size(data, 4));
值=数据(mask4d);
(假设掩码的三个维度对应于数据的前三个维度)。