赞
踩
- clear
- %表示a(t)
- t=0:0.01:3;
- a(1:100)=1;
- a(101:200)=-1;
- a(201:301)=1;
-
- fs=1; %抽样频率
- fc=0.3; %载波频率
-
- %调制
- y1=modulate(a,fc,fs,'am');%幅度调制
- y2=modulate(a,fc,fs,'fm');%频率调制
- y3=modulate(a,fc,fs,'pm',1);%相位调制
-
- %解调
- a1=demod(y1,fc,fs,'am');
- a2=demod(y2,fc,fs,'fm');
- a3=demod(y3,fc,fs,'pm',1);
-
- %绘出相关波形
- figure(1);
- subplot(211)
- plot(t,a);ylabel('a(t)');grid on;
- axis([0 4 -1.5 1.5])
- figure(2)
- subplot(321)
- plot(y1);title('幅度调制');grid on;
- subplot(322)
- plot(a1);title('AM解调后的信号');grid on;
- subplot(323)
- plot(y2);title('频率调制');grid on;
- subplot(324)
- plot(a2);title('FM解调后的信号');grid on;
- subplot(325)
- plot(y3);title('相位调制');grid on;
- subplot(326)
- plot(a3);title('PM解调后的信号');grid on;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。