diff --git a/pammod b/pammod
new file mode 100644
index 0000000000000000000000000000000000000000..4bec4e1c1c6d1a83d9c6d6e9dc38e1867a80541c
--- /dev/null
+++ b/pammod
@@ -0,0 +1,20 @@
+function [s] = pammod(N_symbols,M)
+% Randomly produces a sequence of N_symbols symbols, using a PAM modulation
+% with parameter M, giving the number of possible symbol values. M should
+% be a power of 2 ; the number of bits per symbol is then given by log_2(M)
+
+symbols_TX = (rand(N_symbols,1)-0.5)*M;
+
+s = zeros(N_symbols,1);
+
+for i = 1:N_symbols
+    if symbols_TX(i) == 0
+        s(i) = -1;
+    elseif symbols_TX(i) < 0
+        s(i) = floor(symbols_TX(i))*2+1;
+    elseif symbols_TX(i) > 0
+        s(i) = ceil(symbols_TX(i))*2-1;
+    end
+end
+
+end
\ No newline at end of file