Merge branch 'upstream' into dfsg-orig
[debian/gnuradio] / gr-radar-mono / src / utils / read_echos.m
diff --git a/gr-radar-mono/src/utils/read_echos.m b/gr-radar-mono/src/utils/read_echos.m
new file mode 100644 (file)
index 0000000..3fae47b
--- /dev/null
@@ -0,0 +1,7 @@
+# Read echos from file into array
+function echos = read_echos(filename, len, drop)
+    e = read_complex_binary(filename);
+    n = length(e)/len-drop;
+    start = drop*len+1;
+    echos = reshape(e(start:end), len, n).';
+endfunction