sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/CAE/max3d.m
2016-04-28 15:40:36 -04:00

8 lines
No EOL
173 B
Matlab

function X = max3d(X, M)
ll = size(X);
B=X(M);
B=B+rand(size(B))*1e-12;
B=(B.*(B==repmat(max(B,[],2),[1 size(B,2) 1])));
X(M) = B;
reshape(X,ll);
end