📄 am.m
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject:
Date: Thu, 27 Mar 2008 20:19:51 +0800
MIME-Version: 1.0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mathworks.com/matlabcentral/files/19326/AM.m
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.3268" name=3DGENERATOR></HEAD>
<BODY><PRE>%%Amplitude modulation ----Single Tone Modulation
%Howard H Ho /3/26/08
%Carrier Amplitude
Ac=3D1;
%Carrier frequency
Fc=3D0.4;
%baseband frequency
Fm=3D0.05;
%sampling
Fs=3D10;
%%undermodulation
mu=3D0.5;
t=3D0:1/Fs:200;
mt=3Dcos(2*pi*Fm*t);
st=3DAc*(1+mu*mt).*cos(2*pi*Fc*t);
subplot(2,1,1);
plot(t,st,t,Ac*(mu*mt+ones(1,length(mt))),'r');
title('\mu=3D0.5 =
undermodulation=A3=BAAc(1+\mucos(2\pi0.05t))cos(2\pi0.4t)');
xlabel('time (s)');ylabel('amplitude');
st_fft=3Dfft(st);
st_fft=3Dfftshift(st_fft);
st_fft_fre=3DFs/2*linspace(-1,1,length(st_fft));
% st_fft=3Dabs(st_fft(1:length(st_fft)/2+1));
% st_fft_fre=3D[0:length(st_fft)-1]*Fs/length(st_fft)/2;
subplot(2,1,2);
plot(st_fft_fre,abs(st_fft));
title('spectrum=A3=BAside frequency amplitude=3Dcarrier frequency =
amplitude*\mu/2');
xlabel('Frequency (Hz)');axis([-1 1 0 1000*Ac+100]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%total modulation
figure;
mu=3D1;
t=3D0:1/Fs:200;
mt=3Dcos(2*pi*Fm*t);
st=3DAc*(1+mu*mt).*cos(2*pi*Fc*t);
subplot(2,1,1);
plot(t,st,t,Ac*(mu*mt+ones(1,length(mt))),'r');
title('\mu=3D1 total =
modulation=A3=BAAc(1+\mucos(2\pi0.05t))cos(2\pi0.4t)');
xlabel('time (s)');ylabel('amplitude');
st_fft=3Dfft(st);
st_fft=3Dfftshift(st_fft);
st_fft_fre=3DFs/2*linspace(-1,1,length(st_fft));
subplot(2,1,2);
plot(st_fft_fre,abs(st_fft));
title('spectrum=A3=BAside frequency amplitude=3Dcarrier frequency =
amplitude*\mu/2');
xlabel('Frequency (Hz)');axis([-1 1 0 1000*Ac+100]);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%overmodulation
figure;
mu=3D2;
t=3D0:1/Fs:200;
mt=3Dcos(2*pi*Fm*t);
st=3DAc*(1+mu*mt).*cos(2*pi*Fc*t);
subplot(2,1,1);
plot(t,st,t,Ac*(mu*mt+ones(1,length(mt))),'r');
title('\mu=3D2 =
overmodulation=A3=BAAc(1+\mucos(2\pi0.05t))cos(2\pi0.4t)');
xlabel('time (s)');ylabel('amplitude');
st_fft=3Dfft(st);
st_fft=3Dfftshift(st_fft);
st_fft_fre=3DFs/2*linspace(-1,1,length(st_fft));
subplot(2,1,2);
plot(st_fft_fre,abs(st_fft));
title('spectrum=A3=BAside frequency amplitude=3Dcarrier frequency =
amplitude*\mu/2');
xlabel('Frequency (Hz)');axis([-1 1 0 1000*Ac+100]);</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -