aboutsummaryrefslogtreecommitdiff
path: root/octave/save_comp.m
blob: b8e663f954e377e2d8d93e1f14842ee222a0762d (plain)
1
2
3
4
5
6
7
8
9
10
11
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