lic

Post on 07-Feb-2016

2 views 0 download

description

lic

Transcript of lic

MATLAB CODE :

x(n):

clc;clear all;n=(-3:1:3);x=[2 -1 3 1 -2 4 1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[n]');

x(-n):

clc;clear all;n=(-2:1:4);x=[2 -1 3 1 -2 4 1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-n]');

x(n+2):

clc;clear all;n=(-5:1:1);x=[2 -1 3 1 -2 4 1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[n+2]');

x(n-1):

clc;clear all;n=(-2:1:4);x=[2 -1 3 1 -2 4 1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[n-1]');

x(2n):

clc;clear all;n=(-2:1:2);x=[-1 1 4];stem(n,x);xlabel('n');ylabel('x[n]');title('x[2n]');

x(n/3):

clc;clear all;n=(-1:1:1);x=[4 1 -1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[n/3]');

x(-2n):

clc;clear all;n=(-1:1:5);x=[4 1 -1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-2n]');

x(-n/2):

clc;clear all;n=(-6:1:6);x=[1 0 4 0 -2 0 1 0 3 0 -1 0 2];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-n/2]');

x(-n+2):

clc;clear all;n=(-1:1:5);x=[1 4 -2 1 3 -1 2];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-n+2]');

x(-n-3):

clc;clear all;n=(-6:1:0);x=[1 4 -2 1 3 -1 2];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-n-3]');

x(-2n-2):

clc;clear all;n=(-2:1:0);x=[4 1 -1];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-2n-2]');

x(-n/2+1):

clc;clear all;n=(-8:1:4);x=[1 0 4 0 -2 0 1 0 3 0 -1 0 2];stem(n,x);xlabel('n');ylabel('x[n]');title('x[-n/2+1]');

GRAPHS: