close all clear all clc t = -10:.1:10; b = 3; s1 = tanh(t); s2 = tanh(t-b); s3 = tanh(t+b); figure plot(t,s1,t,s2,t,s3) grid on xlabel('time [s]') ylabel('signal') title('tanh and its shifted versions') % printing figure in png format set(gcf,'PaperUnits','inches','PaperPosition',[0 0 4 3]) print -dpng exercise1.png -r100