samplefreq=100; tstep=1/samplefreq; t1=0:tstep:0.5-tstep; t2=0.5+tstep:tstep:1.0-tstep; t=[t1 t2]; n=length(t); x=[sin(4*2*pi*t1) sin(9*pi*2*t2)];