tomwalters@0: % tool tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % bleeck@3: % This external file is included as part of the 'aim-mat' distribution package bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: function str=readparameterfile(filename) tomwalters@0: tomwalters@0: lines=loadtextfile(filename); tomwalters@0: nr_lines=size(lines,2); tomwalters@0: tomwalters@0: varcounter=1; tomwalters@0: for i=1:nr_lines % tranlsate each line in a parameter and a value tomwalters@0: line=lines{i}; tomwalters@0: count=1;tab=sprintf('\t');ret=sprintf('\n'); tomwalters@0: maxline=size(line,2); tomwalters@0: while ~strcmp(line(count),' ') & ~strcmp(line(count),tab) & count < maxline & count <1000 % run till the first space tomwalters@0: count=count+1; tomwalters@0: end tomwalters@0: str1=line(1:count-1); tomwalters@0: str2=line(count+1:end); tomwalters@0: if strcmp(str2,'') str2=' '; end tomwalters@0: tomwalters@0: str.name{varcounter}=str1; tomwalters@0: str.argument{varcounter}=str2; tomwalters@0: varcounter=varcounter+1; tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: