clc
close all
% x=-10:20;
% y=5*sin(x);
% subplot(3,1,1)
% stem(x,y)
% title('sine wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% hold on
% y=5*exp(-(x.^2));
% subplot(3,1,2)
% stem(x,y)
% title('gausian wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% hold on
% subplot(3,2,1)
% y=[zeros(1,10) 1 zeros(1,10)];
% stem(x,y)
% title('impulse wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% hold on
% y=[zeros(1,10) ones(1,21)];
% stem(x,y);
% title('step wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% hold on
% subplot(3,3,1)
% y=[zeros(1,11) 1:20];
% stem(x,y);
% title('ramp wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% hold on
% a=0:0.05:10;
% u=[a.^2];
% y=[zeros(1,11) 1:20];
% stem(a,u);
% title('parabolic wave');
% xlabel('x-axis');
% ylabel('y-axis');
% grid on
% n=-5:0.1:5;
% u=sin(n)./n;
% stem(n,u);
% title('sinc function');
% xlabel('time');
% ylabel('amplitude');
% n=0:0.1:10;
% a=0.5;
% x=a.^n;
% stem(n,x);
% axis([0 10 0 1]);
% t=-10:0.1:10;
% a=0.5;
% x=exp(-a*t.^2);
% stem(t,x);
% n=-10:0.1:10;
% a=-2;
% x1=1-abs(n)/a;
% x2=0;
% x=x1.*(abs(n)<=a)+x2.*(abs(n)>a);
% stem(n,x)