diff options
| author | Author Name <[email protected]> | 2023-07-07 12:20:59 +0930 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-07-07 12:29:06 +0930 |
| commit | ac7c48b4dee99d4c772f133d70d8d1b38262fcd2 (patch) | |
| tree | a2d0ace57a9c0e2e5b611c4987f6fed1b38b81e7 /octave/save_comp.m | |
shallow zip-file copy from codec2 e9d726bf20
Diffstat (limited to 'octave/save_comp.m')
| -rw-r--r-- | octave/save_comp.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/octave/save_comp.m b/octave/save_comp.m new file mode 100644 index 0000000..b8e663f --- /dev/null +++ b/octave/save_comp.m @@ -0,0 +1,12 @@ +% save_comp.m +% David Rowe Aug 2020 + +function save_comp(fn, iq) + l = length(iq); + s = zeros(1,2*l); + s(1:2:2*l) = real(iq); + s(2:2:2*l) = imag(iq); + fs=fopen(fn,"wb"); + s = fwrite(fs,s,"float32"); + fclose(fs); +endfunction |
