Hi. Can anyone please tell me how to shade the encircled area(in red)?
The graph is as follows
And the code is as follows
tx1=-7:0.1:-1;tx2=-1:0.1:0.5;tx3=0.5:0.1:3;tx4=3:0.1:7;tx=[tx1 tx2 tx3 tx4];x1=zeros(size(tx1));x2=0.6.*ones(size(tx2));x3=0.3.*ones(size(tx3));x4=zeros(size(tx4));x=[x1 x2 x3 x4];th1=-7:0.1:0;th2=0:0.1:7;h1=zeros(size(th1));h2=ones(size(th2));h3=[h1 h2];th=[th1 th2];h4=exp(-th);h=h3.*h4;t=0;plot(tx,x,-th+t,h,'-','linewidth',2)ylim([-0.1 1.1])legend('x(\tau)','h(t-\tau)')grid
Best Answer