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 tomwalters@0: function sig=shiftcircular(sig,shifttime) tomwalters@0: % shift the period in time circlular tomwalters@0: % if shifttime > 0then circle positiv, otherwise negative tomwalters@0: tomwalters@0: tomwalters@0: bin=time2bin(sig,shifttime); tomwalters@0: nrpoints=getnrpoints(sig); tomwalters@0: if bin<1 tomwalters@0: bin=nrpoints+bin; tomwalters@0: end tomwalters@0: tomwalters@0: vals=getvalues(sig); tomwalters@0: valnew=zeros(size(vals)); tomwalters@0: tomwalters@0: valnew(1:bin)=vals(end-bin+1:end); tomwalters@0: valnew(bin+1:end)=vals(1:end-bin); tomwalters@0: tomwalters@0: sig=setvalues(sig,valnew);