MATLAB 帮助中心
Pulse amplitude demodulation
Z = pamdemod(Y,M)
Z = pamdemod(Y,M,initphase)
Z = pamdemod(Y,M,initphase,symorder)
Z = pamdemod(Y,M) applies pulse amplitude demodulation to the pulse amplitude modulated signal, Y, of order M and returns the demodulated input signal.
Z
Y
M
example
Z = pamdemod(Y,M,initphase) specifies the initial phase of the modulated signal in radians.
initphase
Z = pamdemod(Y,M,initphase,symorder) specifies the symbol mapping order for the demodulation.
symorder
collapse all
Demodulate a noiseless pulse amplitude modulated signal of order 8. Verify that the input data symbols match the demodulated symbols.
Generate random 8-ary data symbols.
M = 8; dataIn = randi([0 M-1],100,1);
Apply pulse amplitude modulation (PAM) to the generated data.
modData = pammod(dataIn,M);
Apply pulse amplitude demodulation to the modulated data.
demodData = pamdemod(modData,M);
Compare the first five symbols.
[dataIn(1:5) demodData(1:5)]
ans = 5×2 6 6 7 7 1 1 7 7 5 5
Determine the number of symbol errors in the demodulated data.
symErrors = symerr(dataIn,demodData)
symErrors = 0
Demodulate a noisy pulse amplitude modulated signal of order 8.
M = 8; dataIn = randi([0 M-1],1000,1);
Apply pulse amplitude modulation (PAM) to the generated data. Employ a Gray-coded symbol mapping order for the modulation.
modData = pammod(dataIn,M,0,"gray");
Pass the modulated data through an additive white Gaussian noise channel. Set the signal-to-noise ratio to 8 dB.
noisyData = awgn(modData,M);
Display the noisy PAM constellation.
scatterplot(noisyData)
Apply pulse amplitude demodulation to the noisy modulated data.
demodData = pamdemod(noisyData,M,0,"gray");
symErrors = 1
Pulse amplitude modulated signal, specified as a scalar, vector, or matrix. If Y is a matrix, the function processes the columns independently.
Data Types: single | double Complex Number Support: Yes
single
double
Modulation order, specified as a positive integer power of two.
Data Types: single | double
0
[]
Initial phase of the modulated signal in radians, specified as a scalar.
"bin"
"gray"
Symbol mapping order for the demodulation, specified as one of these options.
"bin" — Use a binary-coded mapping order.
"gray" — Use a Gray-coded mapping order.
The symorder argument specifies how the function assigns binary vectors to corresponding integers.
Data Types: char | string
char
string
Demodulated input signal, returned as a scalar, vector, or matrix of integers in the range [0, M–1]. Z is of the same length as Y.
Data Types: double | single
expand all
Introduced before R2006a
pammod
qamdemod
qammod
pskmod
pskdemod
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处