71
72% Competitive Soft Transfer Function
73function a = softmax_apply(n)
74nmax = max(n,[],1);
75n = bsxfun(@minus,n,nmax);
76numer = exp(n);
77denom = sum(numer,1); 
78denom(denom == 0) = 1;
79a = bsxfun(@rdivide,numer,denom);
80end
81
82% Sigmoid Symmetric Transfer Function