You are on page 1of 1

t=linspace(0,5,500);

x=5*sin(12*t);
plot(t,x)
a=-3:0.01:2;
d=a>=0;
s=exp(-3*a)-exp(-6*a);
fun=d.*s;
plot(a,fun)
n=3:9;
x1= [0,3.1,2.5,3.7,3.2,2.6,0];
stem(n,x1)
n1=0:99;
X2=sin(0.2*n1);
stem(n1,X2)
n2=-20:59;
int=(n2>=0).*(n2<=39);
x3=(sin(0.2*n2)).*(int);
stem(n2,x3);

You might also like