sustaining_gazes/matlab_version/face_validation/DeepLearnToolbox/CAE/max3d.m

8 lines
173 B
Mathematica
Raw Normal View History

2016-04-28 21:40:36 +02:00
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