%%figure 7 time residue of different distance fso1=exp(-1j*2*pi*1e4*(0:5000-1)'/1e6); fso=repmat(fso1,[1,31]); wf2_18=gfilter(wfbank(:,30:60).*fso,1e6,0,8e3); [~,tm]=max(abs(wf2_18(1000:1040,:))); [~,tm1]=max(real(wf2_18(1000:1040,:))); for ii=1:31 swf2_18(:,ii)=circshift(wf2_18(:,ii),-tm(ii)); end transfwf=swf2_18(:,2:end)./repmat(swf2_18(:,1),[1,30]); phase=atan2(imag(transfwf),real(transfwf)); peakphase=phase(1000,:); phaseresidue=(round((tm(2:end)-repmat(tm(1),[1,30]))/100)*100)-peakphase/(2*pi*1e4)*1e6; for ii=1:30 [~,tm2(ii)]=max(xcorr(wfbank(500:2000,30),wfbank(500:2000,30+ii))); end tm2=tm2-1500; figure plot(phaseresidue,'color','r','linewidth',3) hold on plot(tm2,'color','g','linewidth',2) plot(tm(2:end)-repmat(tm(1),[1,30]),'color','b','linewidth',2) plot(tm1(2:end)-repmat(tm1(1),[1,30]),'color','k','linewidth',2) plot([0 30],[mean(abs(phaseresidue)) mean(abs(phaseresidue))],'r--','linewidth',1.5) plot([0 30],[mean(abs(tm(2:end)-repmat(tm(1),[1,30]))) mean(abs(tm(2:end)-repmat(tm(1),[1,30])))],'b--','linewidth',1.5) plot([0 30],[mean(abs(tm1(2:end)-repmat(tm1(1),[1,30]))) mean(abs(tm1(2:end)-repmat(tm1(1),[1,30])))],'k--','linewidth',1.5) plot([0 30],[mean(abs(tm2)) mean(abs(tm2))],'g--','linewidth',1.5) xlim([0 30]) grid on % legend('Phase of complex waveform','Peak of complex waveform','Peak of filtered waveform') set(gca,'fontsize',16) % ylabel('[\deltat]=[t-d/c]=\mus','FontSize', 20);xlabel('[\Deltad]=[d-300]=km','FontSize', 20) ylabel('[\deltat] = \mus','FontSize', 20);xlabel('[\Deltad] = km','FontSize', 20) set(gca,'XTickLabel',{'0','50','100','150','200','250','300'}) print fig7.tif -dtiff %sum(abs(phaseresidue))= 62.637908473800657 mean=2.08 std=1.64 %sum(abs(tm(2:end)-repmat(tm(1),[1,30])))=127 mean=4.23 std=2.56 %sum(abs(tm1(2:end)-repmat(tm1(1),[1,30])))=79 mean=2.63 std=1.24