You are on page 1of 3

Siddhant pratap singh

21111043

Experiment-3
AIM: To plot the following discrete signals.

1. U[n-3]
2. r[n-3]
3. sinc[n/4] n=-10 to 10
4. 4(0.8)n cos(0.2 npi) U[n] -10<=n<=10
5. y(x) = sin(x cos(x)/(x2+3x+1) 1<x<3

1. U[n-3]
>> n = -10 : 1 : 10; unitstep = n >= 3; stem(n ,
unitstep); title('u[n-3]') ylabel('unit function');
xlabel('x');

2. r[n-3]
>> n = -10 : 1 : 10;
unitstep = n>= 3; ramp = n.*unitstep; stem(n ,
ramp); title('r[n-3]') ylabel('ramp function');
xlabel('x');
Siddhant pratap singh
21111043

3. sinc[n/4] n=-10 to
10

>> n = -10 : 0.1 : 10; y =


(sin((n.*pi)./4)). /((pi.*n./4)); stem(n ,
y); title('sinc[n/4]'); ylabel('sinc
function'); xlabel('x');

4. 4(0.8)n cos(0.2 npi)


U[n]

>> n = -10 : 0.1 : 10; unit = n>=0;


Y =4.*(0.8.^n). *cos(0.2.*n.*pi).*unit;
stem(n ,y); title('function'); ylabel('y');
xlabel('x');
Siddhant pratap singh
21111043

5.

y(x)
=sin(xcos(x)/(x2+3x+1)

x = 1 : 0.1 : 3;
y = sin(x.*(cos(x))./(x.^2 + 3.*x + 1));
stem(x ,y); ylabel('y(x)'); xlabel('x');

You might also like