You are on page 1of 4

DTSS PRACTICAL

Exp No. :
:

Roll No. :

D.O.E

Aim : To check periodicity of a given signal


Program :
clc;
n=-10:10;
x1=cos((4*pi*n)/5);
subplot(3,2,1);stem(n,x1);
xlabel('n');
ylabel('sequence1');
title('Checking periodicity of the cos sequence');
grid on;
x2=sin(4*pi*n);
subplot(3,2,2);stem(n,x2);
xlabel('n');
ylabel('sequence 2');
title('Checking periodicity of the sine sequence');
grid on;
x3=cos((6*pi*n)/sqrt(3));
subplot(3,2,3);stem(n,x3);
xlabel('n');
ylabel('sequence 3');
title('Checking periodicity of the Aperiodic sequence');
grid on;
x4=cos(0.2*pi*n)+sin(0.3*pi*n);
subplot(3,2,4);stem(n,x4);
xlabel('n');
ylabel('sequence 4');
title('Checking periodicity of the combination sin-cos sequence');
grid on;
x5=exp(i*0.2*pi*n);
subplot(3,2,5);stem(n,x5);
xlabel('n');
ylabel('sequence 5');
title('Checking periodicity of the sequence exponential sequence');
grid on;
x6=exp(i*0.2*pi*n)+exp(i*0.4*pi*n);
subplot(3,2,6);stem(n,x6);
xlabel('n');
ylabel('sequence 6');
title('Checking periodicity of the combinational exponential sequence');

grid on;

Waveform :

Results :
>> x1
x1 =
Columns 1 through 9
1.0000

-0.8090

0.3090

0.3090

-0.8090

1.0000

-0.8090

0.3090

0.3090

-0.8090

0.3090

0.3090

-0.8090

1.0000

-0.8090

0.3090

0.3919

0.3429

0.2939

0.2449

0.1959

0.1470

0.0980

-0.0490

-0.0980

-0.1470

-0.1959

-0.2449

-0.2939

-0.3429

0.6199

0.7100

-0.7797

-0.5345

0.9000

0.3319

-0.9747

-0.1125

-0.9747

0.3319

0.9000

-0.5345

-0.7797

0.7100

-0.6180

-0.2212

-0.2212

-0.6180

-0.6420

Columns 10 through 18
-0.8090

1.0000

Columns 19 through 21
0.3090

-0.8090

1.0000

>> x2
x2 =
1.0e-14 *
Columns 1 through 9
0.4899

0.4409

Columns 10 through 18
0.0490

Columns 19 through 21
-0.3919

-0.4409

-0.4899

>> x3
x3 =
Columns 1 through 9
-0.4287

-0.8495

Columns 10 through 18
-0.1125

1.0000

Columns 19 through 21
0.6199

-0.8495

-0.4287

>> x4
x4 =
Columns 1 through 9
1.0000

-0.0000

-0.6420

Columns 10 through 18

1.0000

1.6180

1.2601

0.0000

-1.3968

-2.0000

-1.3968

Columns 19 through 21
1.2601

1.6180

1.0000

>> x5
x5 =
Columns 1 through 4
1.0000 + 0.0000i

0.8090 + 0.5878i

0.3090 + 0.9511i

-0.3090 + 0.9511i

-1.0000 - 0.0000i

-0.8090 - 0.5878i

-0.3090 - 0.9511i

1.0000 + 0.0000i

0.8090 + 0.5878i

-0.8090 + 0.5878i

-1.0000 + 0.0000i

0.3090 - 0.9511i

0.8090 - 0.5878i

1.1180 + 1.5388i

-0.5000 + 1.5388i

-1.1180 + 0.3633i

0.0000 + 0.0000i

-0.5000 + 0.3633i

-1.1180 - 0.3633i

2.0000 + 0.0000i

1.1180 + 1.5388i

-0.5000 - 0.3633i

0.0000 - 0.0000i

-0.5000 - 1.5388i

1.1180 - 1.5388i

Columns 5 through 8
-0.8090 + 0.5878i

Columns 9 through 12
0.3090 - 0.9511i

0.8090 - 0.5878i

Columns 13 through 16
0.3090 + 0.9511i

-0.3090 + 0.9511i

Columns 17 through 20
-0.8090 - 0.5878i

-0.3090 - 0.9511i

Column 21
1.0000 - 0.0000i
>> x6
x6 =
Columns 1 through 4
2.0000 + 0.0000i
Columns 5 through 8
-0.5000 - 0.3633i

Columns 9 through 12
-0.5000 - 1.5388i

1.1180 - 1.5388i

Columns 13 through 16
-0.5000 + 1.5388i

-1.1180 + 0.3633i

Columns 17 through 20
-0.5000 + 0.3633i
Column 21
2.0000 - 0.0000i

-1.1180 - 0.3633i

-0.0000

You might also like