简体   繁体   中英

Frequency Modulation Matlab

i want to make a continious sinwave which will change his frequency 3 times, like in the photo. I tryied with the fmmod function but i can't make it work, so is there any other way , thanks in advance.

在此处输入图片说明

here is my code

Fs = 44100; % Sampling rate of signal
Fc = 3000; % Carrier frequency
t = [0:Fs-1]'/Fs; % Sampling times
x = sin(2*pi*4000*t)+sin(2*pi*5000*t)+sin(2*pi*8000*t); % my signal

dev = 50; % Frequency deviation in modulated signal
y = fmmod(x,Fc,Fs,dev);
plot(y)

Frequency modulation without fmmod:

Fs = 44100; % Sampling rate of signal
T=1/Fs; % period

t = 0:T:0.01; % sample times

% amplitude of message signal
vm = 5
% amplitude of carrier signal 
vc =5
% message frequency 
fm =500
% carrier freq
fc = 5e3
% modulation index
m =5

figure

y = vc*sin(2*pi*fc*t+m.*cos(2*pi*fm*t));
plot(t,y);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM