?? fm.m
字號(hào):
function fm()
%
% FM simulation
%
% Instantaneous frequency = fc+m(fm)sin(2(pi)(fm)t)
%
% Given modulation index m, carrier and modulation frequencies
%
m = 10;
fc = 5e3;
fm = 250;
fs = 1e5;
tstep=1/fs;
t = 0:tstep:0.01;
% Generate the fm signal
fm_out = sin( (2*pi*fc*t) + m*sin(2*pi*fm*t) );
clf
figure(1)
% plot the modulating signal
subplot(5,1,1), plot(t,sin(2*pi*fm*t))
title('Modulating signal')
grid
%plot the carrier signal
subplot(5,1,3), plot(t,sin(2*pi*fc*t))
title('Carrier signal')
grid
%plot the modulated signal
subplot(5,1,5), plot(t,fm_out)
title('FM signal')
xlabel('time in seconds');
grid
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -