Mercurial > hg > human-echolocation
changeset 15:ffc4d61e9538 jabuilder_int
Make input directory a parameter as well
author | Chris Cannam |
---|---|
date | Mon, 03 Mar 2014 13:16:52 +0000 |
parents | fcb75c4045c2 |
children | 6dfa2a7dbebe |
files | simulateBinauralSignals.m |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/simulateBinauralSignals.m Fri Feb 28 15:10:36 2014 +0000 +++ b/simulateBinauralSignals.m Mon Mar 03 13:16:52 2014 +0000 @@ -15,7 +15,11 @@ % .outdir (5th input argument) must be the directory in which the wave file % is to be written. It may be an absolute path, or relative to the current % directory. Temporary files will be written in the same directory. -% .outname (6th input argument) must be the name of the wave file to write, within the outdir, without the .wav suffix (which will be added). +% .outname (6th input argument) must be the name of the wave file to write, +% within the outdir, without the .wav suffix (which will be added). +% .indir (7th input argument) must be the directory from which input data +% such as IR files are to be read. It may be an absolute path, or relative +% to the current directory. % %% Internal workings description @@ -113,6 +117,7 @@ dirweight = inputstruct.dirweight; outdir = inputstruct.outdir; outname = inputstruct.outname; +indir = inputstruct.indir; %% Validate attributes validateattributes(dist,{'double'},{'scalar','>',0}) @@ -121,6 +126,7 @@ validateattributes(dirweight,{'double'},{'scalar','>',0}) validateattributes(outdir,{'char'},{'nonempty'}) validateattributes(outname,{'char'},{'nonempty'}) +validateattributes(indir,{'char'},{'nonempty'}) %% Computation parameters (Some fixed, some taken from input arguments) params.board_size_x = .55; @@ -227,7 +233,7 @@ %% Compute binaural IRs -temp = load('hrir_final.mat'); %This is subject_165 CIPIC data +temp = load([indir filesep 'hrir_final.mat']); %This is subject_165 CIPIC data h3D_lear = temp.hrir_l; h3D_rear = temp.hrir_r; clear temp @@ -485,9 +491,6 @@ end end -disp(['Names before ' names_bef]); -disp(['Names after ' names_aft]); - %get irtot for 1st source 1st receiver and delete files created by %computation. % for n=1:length(names_aft) @@ -501,7 +504,6 @@ % end % end for n=1:length(names_aft) - disp(['name is ' names_aft(n)]); if ~strcmp(names_aft(n),names_bef) if ~isempty(strfind(names_aft{n},'_1_1_ir.mat')) temp=load([outdir filesep names_aft{n}]);