tomwalters@0: % method of class @signal tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % 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=secondderivation(sig) tomwalters@0: % calculates the second derivation by calculation of the differences tomwalters@0: tomwalters@0: tomwalters@0: val=getvalues(sig); tomwalters@0: tomwalters@0: nr=length(val); tomwalters@0: tomwalters@0: tomwalters@0: nval=val; tomwalters@0: nval(1)=0; tomwalters@0: nval(2)=0; tomwalters@0: for i=3:nr tomwalters@0: tomwalters@0: if i==370 tomwalters@0: a=0; tomwalters@0: end tomwalters@0: nval(i)=(val(i-2)-2*val(i-1)+val(i))/2; tomwalters@0: end tomwalters@0: tomwalters@0: sig=setvalues(sig,nval);