Professional Documents
Culture Documents
Sine Generation
Z-Transform Table
Impulse d(n) 1
wT 2ft
z sin( wT )
H ( z) 2 f osc. frequency
z 2 z cos(wT ) 1
T 1/ fs
Y ( z ) z 2 z sin( wT )
H ( z)
2 2
X ( z ) z z 2 z cos(wT ) 1
Y ( z) z 1 sin( wT )
X ( z ) 1 2 z 1 cos(wT ) z 2
Y ( z ) 1 2 z cos(wT ) z
1 2
z 1
sin( wT ) X ( z )
1.4
1.2
>>[x,n]=impseq(0,-3,9); 1
0.4
0.2
0
-4 -2 0 2 4 6 8 10
Sinusoidal Sequence
1
0.8
» n=[0:9]; 0.6
» h=sin(0.503*n); 0.4
» stem(n,h),grid
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7 8 9
Convolution
» [x,n]=impseq(0,-3,9);
» h=sin(0.503*n);
» y=conv(x,h)
y=
Columns 1 through 7
Columns 8 through 14
Columns 15 through 21
-0.7723 -0.9829 0 0 0 0 0
Columns 22 through 25
0 0 0 0
yHAND={0,0.4821,0.8443,0.9980,0.9048,0.5878,0.1253,-0.3681,-0.7705,-0.9823}
yMATLAB={0,0.4821,0.8447,0.9981,0.9042,0.5864,0.1233,-0.3704,-0.7723,-0.9829}
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7 8 9
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-10 -5 0 5 10 15 20
y (n) 2 cos(wT ) y (n 1) y (n 2) sin( wT ) x(n 1)
>> [x,n]=impseq(0,-3,25);
>> h=sin(0.628*n);
>> y=conv(x,h);
>> t=[-6:1:length(y)-7];
>> stem(t,y),grid
Note that 1 period is 10
samples and that 10 X
.0001 seconds is 1 ms, or
a frequency of 1 kHz.