close all clear all clc t = -10:.1:10; a = 2; b = 6; figure plot(t,tanh(t),... t,tanh(a*t),t,tanh(t/a),... t,tanh(a*t-b),t,tanh(a*t+b),... t,tanh((t-b)/a),t,tanh((t+b)/a)) grid on xlabel('time [s]') ylabel('signal') legend('tanh(t)','tanh(at)','tanh(t/a)',... 'tanh(at-b)','tanh(at+b)',... 'tanh((t-b)/a)','tanh((t+b)/a)') title('tanh and its shifted/scaled versions') % printing figure in png format set(gcf,'PaperUnits','inches','PaperPosition',[0 0 4 3]) print -dpng homework1.png -r100