close all; subplot(131); fplot(@(x)1/(1+exp(-x)), [-10, 10]); axis([-10, 10, -2, 2]); axis square; grid on; title('Sigmoid'); subplot(132); fplot(@(x)tanh(x/2), [-10, 10]); axis([-10, 10, -2, 2]); axis square; grid on; title('Hyper-tangent'); subplot(133); fplot(@(x)x, [-10, 10]); axis([-10, 10, -10, 10]); axis square; grid on; title('Identity'); %% figure; subplot(321); fplot(@(x)1/(1+exp(-x)), [-10, 10]); axis([-10, 10, -2, 2]); axis square; grid on; title('Sigmoid'); subplot(322); fplot(@(x)tanh(x), [-10, 10]); axis([-10, 10, -2, 2]); axis square; grid on; title('Hyper-tangent'); subplot(323); fplot(@(x)x/(1+abs(x)), [-10, 10]); axis([-10, 10, -2, 2]); axis square; grid on; title('Softsign'); subplot(324); fplot(@(x)max(x,0), [-10, 10]); axis([-10, 10, -10, 10]); axis square; grid on; title('ReLU'); subplot(325); fplot(@(x)max(x,0.1*x), [-10, 10]); axis([-10, 10, -10, 10]); axis square; grid on; title('Leaky ReLU'); subplot(326); fplot(@(x)log(1+exp(x)), [-10, 10]); axis([-10, 10, -10, 10]); axis square; grid on; title('Softplus');