振幅调制和解调的原理及MATLAB编程实现 已给出一个编码,但有错误,求修改!% MATLAB script for Illustrative Problem 3.5.% Demonstration script for DSB-AM demodulation.The message signal% is +1 for 0 < t < t0/3,-2 for t0/3 < t <

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 06:13:57

振幅调制和解调的原理及MATLAB编程实现 已给出一个编码,但有错误,求修改!% MATLAB script for Illustrative Problem 3.5.% Demonstration script for DSB-AM demodulation.The message signal% is +1 for 0 < t < t0/3,-2 for t0/3 < t <
振幅调制和解调的原理及MATLAB编程实现 已给出一个编码,但有错误,求修改!
% MATLAB script for Illustrative Problem 3.5.
% Demonstration script for DSB-AM demodulation.The message signal
% is +1 for 0 < t < t0/3,-2 for t0/3 < t < 2t0/3,and zero otherwise.
echo on
t0=.15; % 信号的持续时间
ts=1/1500; % 采样间隔
fc=250; % 载波频率
fs=1/ts; % 采样频率
t=[0:ts:t0]; % 时间向量
df=0.3; % 所需的频率分辨率
% 信息信号
m=[ones(1,t0/(3*ts)),-2*ones(1,t0/(3*ts)),zeros(1,t0/(3*ts)+1)];
c=cos(2*pi*fc.*t); %
u= ones(1,length(c) )
y= ones(1,length(c) )
[M,m,df1]=fftseq(m,ts,df); %
M=M/fs; % 缩放
[U,u,df1]=fftseq(u,ts,df); %
U=U/fs; % 缩放
[Y,y,df1]=fftseq(y,ts,df); %
Y=Y/fs; % 缩放
f_cutoff=150; % cutoff freq.of the filter
n_cutoff=floor(150/df1); % Design the filter.
f=[0:df1:df1*(length(y)-1)]-fs/2;
H=zeros(size(f));
H(1:n_cutoff)=2*ones(1,n_cutoff);
H(length(f)-n_cutoff+1:length(f))=2*ones(1,n_cutoff);
DEM=H.*Y; % spectrum of the filter output
dem=real(ifft(DEM))*fs; % filter output
pause % Press a key to see the effect of mixing.
clf
subplot(3,1,1)
plot(f,fftshift(abs(M)))
title('信息信号的频谱')
xlabel('频率')
subplot(3,1,2)
plot(f,fftshift(abs(U)))
title('调制信号的频谱')
xlabel('频率')
subplot(3,1,3)
plot(f,fftshift(abs(Y)))
title('混频器的输出频谱')
xlabel('频率')
pause % Press a key to see the effect of filtering on the mixer output.
clf
subplot(3,1,1)
plot(f,fftshift(abs(Y)))
title('混频器的输出频谱')
xlabel('Frequency')
subplot(3,1,2)
plot(f,fftshift(abs(H)))
title('低通滤波特性')
xlabel('Frequency')
subplot(3,1,3)
plot(f,fftshift(abs(DEM)))
title('解调器的输出频谱')
xlabel('Frequency')
pause % Press a key to compare the spectra of the message and the received signal.
clf
subplot(2,1,1)
plot(f,fftshift(abs(M)))
title('信息信号的频谱')
xlabel('Frequency')
subplot(2,1,2)
plot(f,fftshift(abs(DEM)))
title('解调器的输出频谱')
xlabel('Frequency')
pause % Press a key to see the message and the demodulator output signals.
subplot(2,1,1)
plot(t,m(1:length(t)))
title('信息信号')
xlabel('Time')
subplot(2,1,2)
plot(t,dem(1:length(t)))
title('该解调器输出')
xlabel('Time')

振幅调制和解调的原理及MATLAB编程实现 已给出一个编码,但有错误,求修改!% MATLAB script for Illustrative Problem 3.5.% Demonstration script for DSB-AM demodulation.The message signal% is +1 for 0 < t < t0/3,-2 for t0/3 < t <
补上所缺函数fftseq.m
function [M,m,df]=fftseq(m,ts,df)  
%       [M,m,df]=fftseq(m,ts,df) 
%       [M,m,df]=fftseq(m,ts) 
%FFTSEQ     generates M, the FFT of the sequence m. 
%       The sequence is zero padded to meet the required frequency resolution df. 
%       ts is the sampling interval. The output df is the final frequency resolution. 
%       Output m is the zero padded version of input m. M is the FFT. 
fs=1/ts; 
if nargin == 2 
  n1=0; 
else 
  n1=fs/df; 
end 
n2=length(m); 
n=2^(max(nextpow2(n1),nextpow2(n2))); 
M=fft(m,n); 
m=[m,zeros(1,n-n2)]; 
df=fs/n;

振幅调制和解调的原理及MATLAB编程实现 已给出一个编码,但有错误,求修改!% MATLAB script for Illustrative Problem 3.5.% Demonstration script for DSB-AM demodulation.The message signal% is +1 for 0 < t < t0/3,-2 for t0/3 < t < 对振幅调制解调混频的 认识 什么是基带信号和带通信号,基带调制解调和带通调制解调的原理,他们有何区别? 调制和解调是在哪进行的 如何查看matlab自带函数源代码比如说qpsk调制解调的源代码 Modem即调制解调器 :主要功能是调制和解调解调是什么? 怎么用锁相环设计信号的调制解调? 振幅调制的分类 谁知道什么是信号的调制与解调?为什么要进行调制与解调? 为什么要进行调制和解调有助于回答者给出准确的答案 无线电通信中为什么要采用“调制”和“解调”?他们的作用是什么? 高频电子线路——在无线电通信中为什么要采用“调制”和“解调”?各自的作用是什么? 关于用matlab做的FM调制解调,在FM解调过程中用了一个z=hilbert(u);就实现了解调,请问是怎么实现的就是下面这段代码看不懂,%解调t1=[0:ts:ts*(length(u)-1)];z=hilbert(u);yq =z.*exp(-j*2*pi*fc*t1);%欧拉公式展开 求教无线电帝 请问调谐 调幅 调频广播在检波与调制方法和原理是否一样?请问调谐 调幅 调频广播在检波与调制解调方法和原理是否一样? 关于无线电载波 刚才看到了AM FM 波形图,它们分别是对振幅和频率进行调制解调.我的问题是,电波在空气中传播的速度是一样时,难道调频的时候用的不是一个频率?不然怎么能对一个特定的频 无线电调幅所谓声音调制:就是通过一个声信号的振幅、频率和相位来修饰(调制)另一个声信号的振幅、频率和相位 用一台简易收音机收听某一电台的广播,必须经过的两个过程是什么?A调制和解调 B调谐和检波 C检波和解调 D调频和调幅 用MATLAB研究莫尔斯码的幅度调制与解调.本题研究莫尔斯码的幅度调制与解调.本题中信号的形式为(1)x(t)=m1(t)cos(2*pi*f1*t)+m2(t)cos(2*pi*f2*t)+m1(t)cos(2*pi*f2*t)其中信号x(t)由文件ctftmod.mat定义,可用命