⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loam.m

📁 am调制解调
💻 M
字号:
clear all;close all;clc;clf;
t=0:0.001:2;
dt=0.001;   %定义t及抽样间隔
w=2*pi*2;
n=2*pi*15;

m=sin(w*t);  %基带信号
p=cos(n*t);  %载波信号

AM=cos(n*t)+m.*cos(n*t);  %AM调制信号

subplot(211);
plot(t,m);    %基波信号图
title('(1)基波信号');
ylabel('m(t)');    

subplot(212);
plot(t,p);     %载波信号图
title('(2)载波信号');
ylabel('p(t)');     

figure
subplot(211);
plot(t,AM);       %调制信号图
title('(3)AM调制');  

[qq,ww]=size(AM);
N0=0.1*randn(qq,ww);  %加高斯白噪声
B=AM+N0;
subplot(212);
plot(B);
title('加高斯白噪声');
xlabel('time'); 
ylabel('B(t)');

m1=2*dt*13;
m2=2*dt*17;
[b,a]=butter(4,[m1 m2],'bandpass')
H=filter(b,a,AM);   %带通滤波器
figure
subplot(311)
plot(t,H);
title('取出包络');
xlabel('time'); 
ylabel('H(t)');

subplot(312)
plot(t,m)
title('基带信号');
ylabel('m(t)');

xx=abs(hilbert(H)); %包络检波
xx=xx-1
subplot(313)
plot(t,xx)    %解调信号与原基带信号对比
title('解调信号');
xlabel('time'); 
ylabel('xx(t)')

⌨️ 快捷键说明

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