f(x) = 1 − e−4x 1 + e−4x using a suitable step size, plot this transfer characteristic over the range −2 ≤ x ≤ 2 in matlab

main.m
x = -2:0.01:2;
f = (1 - exp(-4*x)) ./ (1 + exp(-4*x));
plot(x, f);
xlabel('x');
ylabel('f(x)');
title('Transfer Characteristic f(x) = (1 - e^{-4x}) / (1 + e^{-4x})');
grid on;
176 chars
8 lines

related categories

gistlibby LogSnag