tomwalters@0: % method of class @signal tomwalters@0: % function sig=erb2log(sig,cfs) tomwalters@0: % tomwalters@0: % changes the signal (that is ususally a function of frequencies, into tomwalters@0: % another signal with frequencies, but now the spacing is according to the tomwalters@0: % cf list in cfs. All points are interpolated tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % sig: original @signal tomwalters@0: % cfs: list of frequencies tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % sig: new @signal 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 sig=erb2log(sig,cfs) tomwalters@0: tomwalters@0: tomwalters@0: min_fre=cfs(1); tomwalters@0: max_fre=cfs(end); tomwalters@0: nr_points=length(cfs); tomwalters@0: tomwalters@0: log_fres=distributelogarithmic(min_fre,max_fre,nr_points); tomwalters@0: tomwalters@0: erb_fres=cfs; tomwalters@0: erb_vals=sig.werte; tomwalters@0: tomwalters@0: method='cubic'; tomwalters@0: % for i=1:nr_points tomwalters@0: % log_fre=log_fres(i); tomwalters@0: new_vals=interp1(erb_fres,erb_vals,log_fres,method); tomwalters@0: tomwalters@0: tomwalters@0: % end tomwalters@0: tomwalters@0: sig=setvalues(sig,new_vals); tomwalters@0: tomwalters@0: a=0; tomwalters@0: tomwalters@0: tomwalters@0: