dsb调制解调matlab
时间: 2023-11-19 07:53:05 浏览: 273
DSB调制解调是一种模拟调制技术,它将模拟信号与一个高频载波信号相乘,得到一个带有两个边带的调制信号。DSB调制解调的过程可以用MATLAB进行模拟实现。
DSB调制的MATLAB代码如下:
```matlab
% 设置参数
fc = 1000; % 载波频率
fs = 10000; % 采样频率
t = 0:1/fs:1; % 时间序列
Am = 1; % 调制信号幅度
Ac = 2; % 载波信号幅度
% 生成调制信号
fm = 10; % 调制信号频率
m = Am*cos(2*pi*fm*t); % 调制信号
% 生成载波信号
c = Ac*cos(2*pi*fc*t); % 载波信号
% DSB调制
s = m.*c; % 调制信号
% 绘制图形
subplot(3,1,1);
plot(t,m);
title('调制信号');
xlabel('时间');
ylabel('幅度');
subplot(3,1,2);
plot(t,c);
title('载波信号');
xlabel('时间');
ylabel('幅度');
subplot(3,1,3);
plot(t,s);
title('DSB调制信号');
xlabel('时间');
ylabel('幅度');
```
DSB解调的MATLAB代码如下:
```matlab
% 设置参数
fc = 1000; % 载波频率
fs = 10000; % 采样频率
t = 0:1/fs:1; % 时间序列
Am = 1; % 调制信号幅度
Ac = 2; % 载波信号幅度
% 生成调制信号
fm = 10; % 调制信号频率
m = Am*cos(2*pi*fm*t); % 调制信号
% 生成载波信号
c = Ac*cos(2*pi*fc*t); % 载波信号
% DSB调制
s = m.*c; % 调制信号
% DSB解调
y = s.*c; % 解调信号
% 绘制图形
subplot(3,1,1);
plot(t,m);
title('调制信号');
xlabel('时间');
ylabel('幅度');
subplot(3,1,2);
plot(t,c);
title('载波信号');
xlabel('时间');
ylabel('幅度');
subplot(3,1,3);
plot(t,y);
title('DSB解调信号');
xlabel('时间');
ylabel('幅度');
```
阅读全文
相关推荐












