hrtf_dateilesen.m 486 B

1234567891011121314151617
  1. function [ right, left ] = hrtf_dateilesen( filename )
  2. %hrtf_dateilesen Read .dat-Files from HRTF-Measurments
  3. % Optimized version of dateilesen3() - approx. 37x speed up!
  4. numberofrecordings = 5;
  5. fid = fopen(filename,'r');
  6. filecontent = fread(fid,Inf,'short');
  7. fclose(fid);
  8. filelength = length(filecontent);
  9. right = reshape(filecontent(1:filelength/2), 5, filelength/2/numberofrecordings);
  10. left = reshape(filecontent(filelength/2+1:end), 5, filelength/2/numberofrecordings);
  11. end