Signal Processing Toolbox Previous page   Next Page
vco

Voltage controlled oscillator

Syntax

Description

y = vco(x,fc,fs) creates a signal that oscillates at a frequency determined by the real input vector or array x with sampling frequency fs. fc is the carrier or reference frequency; when x is 0, y is an fc Hz cosine with amplitude 1 sampled at fs Hz. 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. Output y is the same size as x.

y = vco(x,[Fmin Fmax],fs) scales the frequency modulation range so that ±1 values of x yield oscillations of Fmin Hz and Fmax Hz respectively. For best results, Fmin and Fmax should be in the range 0 to fs/2.

By default, fs is 1 and fc is fs/4.

If x is a matrix, vco produces a matrix whose columns oscillate according to the columns of x.

Examples

Generate two seconds of a signal sampled at 10,000 samples/second whose instantaneous frequency is a triangle function of time:

Plot the spectrogram of the generated signal:

Algorithm

vco performs FM modulation using the modulate function.

Diagnostics

If any values of x lie outside [-1, 1], vco gives the following error message.

See Also

demod, modulate


Previous page  upsample window Next page

© 1994-2005 The MathWorks, Inc.