hackrf testing util
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 14 Feb 2017 01:25:37 +0000 (01:25 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 14 Feb 2017 01:25:37 +0000 (01:25 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3031 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/octave/gen_complex_short.m [new file with mode: 0644]

diff --git a/codec2-dev/octave/gen_complex_short.m b/codec2-dev/octave/gen_complex_short.m
new file mode 100644 (file)
index 0000000..2513f05
--- /dev/null
@@ -0,0 +1,18 @@
+% gen_complex_short.m
+%
+% David Rowe Feb 2017
+%
+% Generates a complex short signal for HackRF testing.
+
+Fs = 8E3;
+T = 10;
+A = 32000;
+f = 1000;
+
+N = T*Fs;
+t = 0:N-1;
+s = A*exp(j*2*pi*t*f/Fs);
+scomp = zeros(1,2*N);
+scomp(1:2:2*N) = real(s);
+scomp(2:2:2*N) = imag(s);
+save_raw("twotone.iq16",scomp);