2
0

hp_filt.m 280 B

123456789101112
  1. % hp_filt.m
  2. % David Rowe 20 Feb 2012
  3. function hp_filt(in_file, out_file)
  4. fin = fopen(in_file,"rb");
  5. s = fread(fin,Inf,"short");
  6. b = fir1(256, 300/4000, "high");
  7. freqz(b);
  8. s_hpf = filter(b,1,s);
  9. fout = fopen(out_file,"wb");
  10. fwrite(fout, s_hpf, "short");
  11. endfunction