我想制作一个连续的sinwave,它将改变他的频率3次,就像在照片中一样。我尝试使用fmmod
功能,但我无法使其工作,所以还有其他任何方式,在此先感谢。
这是我的代码
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)
答案 0 :(得分:0)
没有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);