Professional Documents
Culture Documents
clc
Fc = 10;
Fd = 5;
Fs = 50;
M = 4;
x = ones(Fd,1)*[0 1 0 0 1]; x=x(:);
[y,t] = dmod(x,Fc,Fd,Fs,'ask',M);
subplot (4,1,1);
plot(t,y)
title('Amplitude Shift Keying');
[y,t] = dmod(x,Fc,Fd,Fs,'fsk',M);
subplot (4,1,2);
plot(t,y)
title('Frequency Shift Keying');
[y,t] = dmod(x,Fc,Fd,Fs,'qam',M);
subplot (4,1,3);
plot(t,y)
title('Quadrature Amplitude Shift Keying');
u=square(x(:),1/Fs);
subplot(4,1,4)
plot(u)
title('Square Wave');
0.5
0.5
0.5
1.5
2
2.5
3
3.5
Frequency Shift Keying
4.5
1.5
2
2.5
3
3.5
Quadrature Amplitude Shift Keying
4.5
4.5
1
0
-1
2
0
-2
1.5
2
2.5
3
Square Wave
3.5
1
0
-1
10
15
20
25