tomwalters@0: % support file for 'aim-mat' tomwalters@0: % 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 tomwalters@0: tomwalters@0: function x=dB(y,method) tomwalters@0: % convert to dB representation tomwalters@0: tomwalters@0: if nargin<2 tomwalters@0: method='power'; tomwalters@0: end tomwalters@0: tomwalters@0: if strcmp(method,'power') tomwalters@0: x=10*log(y)./log(10); tomwalters@0: else tomwalters@0: x=20*log(y)./log(10); tomwalters@0: end