returns a frequency modulated (FM) signal
y = fmmod(
y, given the input message
x, where the carrier signal has frequency
Fc and sampling rate
freqdev is the frequency deviation of the modulated signal.
The value of
Fs must satisfy
The value of
freqdev must satisfy
Set the sampling frequency to 1kHz and carrier frequency to 200 Hz. Generate a time vector having a duration of 0.2 s.
fs = 1000; fc = 200; t = (0:1/fs:0.2)';
Create two tone sinusoidal signal with frequencies 30 and 60 Hz.
x = sin(2*pi*30*t)+2*sin(2*pi*60*t);
Set the frequency deviation to 50 Hz.
fDev = 50;
y = fmmod(x,fc,fs,fDev);
Plot the original and modulated signals.
plot(t,x,'c',t,y,'b--') xlabel('Time (s)') ylabel('Amplitude') legend('Original Signal','Modulated Signal')
x— Input message signal
Input message signal, specified as a scalar, vector, matrix, or a 3-D array. Each
x must be real.
Fc— Carrier frequency
Carrier frequency in hertz (Hz), specified as a positive real scalar.
Fs— Sampling rate
Sampling rate in hertz (Hz), specified as a positive real scalar.
freqdev— Frequency deviation
Frequency deviation of the modulated signal in hertz (Hz), specified as a positive real scalar.
ini_phase— Initial phase
Initial phase of the modulated signal in radians, specified as a real scalar.
y— Frequency modulated output signal
Frequency modulated signal, returned as a scalar, vector, matrix, or 3-D array.