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 linsig=linsigx(sig) tomwalters@0: % usage: linsig=linsigx(sig) tomwalters@0: % transferes the signal from a signal that is in logarithmic scale tomwalters@0: % to a signal, that is in linear scale. tomwalters@0: % reverser operation from logsinx tomwalters@0: % tomwalters@0: % this is a little bit tricky since we cant take the times as measure for tomwalters@0: % the logarithmic part. We therefore take the labels, which must be defined tomwalters@0: % properly! tomwalters@0: tomwalters@0: if length(sig.x_tick_labels) > 0 tomwalters@0: tmin=sig.x_tick_labels(1)/1000; tomwalters@0: tmax=sig.x_tick_labels(end)/1000; tomwalters@0: % tmin=sig.x_tick_labels(1); tomwalters@0: % tmax=sig.x_tick_labels(end); tomwalters@0: else tomwalters@0: error('signal::linsig: definie x labels of signal'); tomwalters@0: end tomwalters@0: tomwalters@0: nr_points=getnrpoints(sig); tomwalters@0: tomwalters@0: oldvals=getvalues(sig); tomwalters@0: newvals=zeros(nr_points,1); tomwalters@0: tomwalters@0: tomwalters@0: % [ntimes,scaleinfo]=distributelogarithmic(tmin,tmax,nr_points); tomwalters@0: ntimes=linspace(tmin,tmax,nr_points); tomwalters@0: mtimes=f2f(ntimes,0.001,0.035,0.001,0.035,'loglin'); tomwalters@0: % mtimes=f2f(ntimes,tmin,tmax,tmin,tmax,'loglin'); tomwalters@0: newvals=gettimevalue(sig,mtimes); tomwalters@0: tomwalters@0: sr=nr_points/(tmax-tmin); tomwalters@0: linsig=signal(newvals,sr); % copy all values tomwalters@0: linsig=setstarttime(linsig,tmin); tomwalters@0: tomwalters@0: