y = vco(x,fc,fs)
creates a signal that oscillates at a frequency determined by the real input vector or
matrix x with sampling frequency fs. If
x is a matrix, vco produces a matrix whose columns
oscillate according to the columns of x.
Generate two seconds of a signal composed of a voltage-controlled oscillator (VCO) and four Gaussian atoms. The instantaneous frequency is modulated by a chirp function. The sample rate is 14 kHz.
fs = 14000;
t = (0:1/fs:2)';
gaussFun = @(A,x,mu,f) exp(-(x-mu).^2/(2*0.01^2)).*sin(2*pi*f.*x)*A';
s = gaussFun([1 1 1 1],t,[0.2 0.5 1 1.75],[10 60 25 5]*100)/10;
x = vco(chirp(t+.1,0,t(end),3).*exp(-2*(t-1).^2),0.2*fs,fs);
s = s/10+x;
Plot the spectrogram of the generated signal. Specify 90% overlap and moderate spectral leakage.
Input data, specified as a real vector or real matrix. x ranges
from –1 to 1, where x =
–1 corresponds to 0 frequency output, x =
0 corresponds to fc, and
x = 1 corresponds to
2*fc.
fc — Carrier frequency fs/4 (default) | real positive scalar
Carrier or reference frequency used to modulate the input signal, specified as a
real positive scalar.
Fmin, Fmax — Frequency modulation range limits real vector
Frequency modulation range limits, specified as a real vector. For best results,
Fmin and Fmax should be in the range 0 to
fs/2.
Note
vco performs FM modulation using the modulate function.
fs — Sample rate positive scalar
Sample rate, specified as a positive scalar. The sample rate
is the number of samples per unit time. If the unit of time is seconds,
then the sample rate has units of Hz.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.