exa090802_modulate.m

来自「胡广书数字信号处理的MATLAB程序」· M 代码 · 共 43 行

M
43
字号
%--------------------------------------------------------------------------
% exa090802_modulate.m,  for example 9.8.2
% to test modulate.m;
%
% 注:此程序在 MATLAB 5.3 下可以运行,在 MATLAB 6.1下可能无法运行!
%--------------------------------------------------------------------------
clear all;

% 得到待调数据;
t=0:.1:4*pi; 
x=sin(t);
fs=1;
fc=.25; 
subplot(321)
plot(x)
ylabel('  x(t)')

% 以下是不同的调制方式;
y=modulate(x,fc,fs,'am');
subplot(322)
plot(y)
ylabel('  for "am"')

y=modulate(x,fc,fs,'amdsb-tc');
subplot(323)
plot(y)
ylabel('  for "amdsb-tc"')

y=modulate(x,fc,fs,'amssb');
subplot(324)
plot(y)
ylabel('  for "amssb"')

y=modulate(x,fc,fs,'fm');
subplot(325)
plot(y)
ylabel('  for "fm"')

y=modulate(x,fc,fs,'pm');
subplot(326)
plot(y)
ylabel('  for "pm"')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?