Function File: y = pammod (x, m)
Function File: y = pammod (x, m, phi)
Function File: y = pammod (x, m, phi, type)

Modulates an information sequence of integers x in the range [0 … M-1] onto a pulse amplitude modulated signal y. phi controls the initial phase and type controls the constellation mapping. If type is set to "Bin" will result in binary encoding, in contrast, if set to "Gray" will give Gray encoding. An example of Gray-encoded 8-PAM is

d = randint (1, 1e4, 8);
y = pammod (d, 8, 0, "gray");
z = awgn (y, 20);
plot (z, "rx")

See also: pamdemod.

Package: communications