Code 12
fs=500; t=0:1/fs:0.1; y1=t; subplot(2,2,1); plot(t,y1); xlabel('time'); ylabel('amplitude'); title('ramp signal'); %generation of ramp sequence subplot(2,2,2); stem(y1); xlabel('n'); ylabel('amplitude'); title('ramp sequence'); %generation of impulse signal y2=(t==0); subplot(2,2,3); plot(t,y2); axis([-1 1 0 1]) xlabel('time'); ylabel('amplitude'); title('impulse signal'); %generation of impulse sequence subplot(2,2,4); stem(y2); xlabel('n'); ylabel('amplitude'); title('impulse sequence'); %generation of unit step signal n=-10:1:10; y3=(n>=0); figure; subplot(2,2,1); plot(n,y3); xlabel('time'); ylabel('amplitude'); title('unit step signal'); %generation of unit step sequence subplot(2,2,2); stem(n,y3); xlabel('n'); ylabel('amplitude'); title('unit step sequence'); %generation of square wave signal y4=square(2*pi*50*t);...