close all clear all clc t = -1:.1:10; s = (t>=0).*exp(-t); figure plot(t,s) grid on xlabel('time [s]') title('one-sided exponential') % printing figure in png format set(gcf,'PaperUnits','inches','PaperPosition',[0 0 4 3]) print -dpng exercise2.png -r100