Demodulation for communications simulation
x = demod(y,fc,fs,
'method'
)
x = demod(y,fc,fs,'method'
,opt)
x = demod(y,fc,fs,'pwm','centered')
demod
performs
demodulation, that is, it obtains the original signal from a modulated
version of the signal. demod
undoes the operation
performed by modulate
.
x = demod(y,fc,fs,
and'method'
)
x = demod(y,fc,fs,
demodulate
the real carrier signal 'method'
,opt)y
with a carrier frequency fc
and
sampling frequency fs
, using one of the options
listed below for method
. (Note that some
methods accept an option, opt
.)
Note:
Use 
Method  Description 

or


 Amplitude demodulation, double sideband, transmitted
carrier. Multiplies
If
you specify 
 Amplitude demodulation, single sideband. Multiplies

 Frequency demodulation. Demodulates the FM waveform by
modulating the Hilbert transform of 
 Phase demodulation. Demodulates the PM waveform by modulating
the Hilbert transform of 
 Pulseposition demodulation. Finds the pulse positions
of a pulseposition modulated signal 
 Pulsewidth demodulation. Finds the pulse widths of a
pulsewidth modulated signal 
 Quadrature amplitude demodulation.

The default method is 'am'
. In all cases
except 'ppm'
and 'pwm'
, x
is
the same size as y
.
If y
is a matrix, demod
demodulates
its columns.
x = demod(y,fc,fs,'pwm','centered')
finds
the pulse widths assuming they are centered at the beginning of each
period. x
is length length(y)*fc/fs
.