%ALIAS illustre l'effet de l'aliasing spatial dans les plans x,t et kx,om % voir : http://jmmeost.free.fr/Sismique/isis.html % fig1 = http://jmmeost.free.fr/Sismique/alias.gif clear all V0 = 1000; dx = 50; nx = 40; xx = 0:dx:(nx-1)*dx; dcx = 1/dx/nx; cxn = 1/2/dx; dt = .01; nt = 50; tt = 0:dt:(nt-1)*dt; df = 1/nt/dt; fn = 1/2/dt; [XX, TT] = meshgrid(xx,tt); f0 = 5; nh = 5; al = 30*pi/180; p0 = 2*sin(al)/V0; figure(1), clf, colormap('copper') for ih = 1:nh; fh = f0*ih; pxt = cos(2*pi*fh*(p0*XX-TT)); subplot(5,2,1+2*(ih-1)), hold on imagesc([0 nx*dx],[0 nt*dt],pxt) plot([0 nx*dx],[0 nx*dx]*p0,'r','Linewidth',2) if ih == 1 legend(['{\alpha} = ' num2str(al*180/pi) '°']) title(['COS(KX*X-OM*T), DX = ' num2str(dx) ' M, DT = ' num2str(dt) ' S, V = ' num2str(V0) ' M/S']) else plot([nx*dx 0],nt*dt+[nx*dx 0]*(p0-2*cxn/fh),'b',[0 nx*dx],[0 nx*dx]*(p0-2*cxn/fh),'b','Linewidth',2) legend(['{\alpha} = ' num2str(al*180/pi) '°'],['{\alpha}al = ' num2str(asin((p0-2*cxn/fh)*V0/2)*180/pi,'%2.0f') '°']) end set(gca,'Xlim',[0 nx*dx],'Ylim',[0 nt*dt],'YDir','reverse','DataAspectRatio',[1000 1 1]) xlabel('X (M)'), ylabel('T(S)') subplot(5,2,2+2*(ih-1)), hold on, grid on imagesc(zeros(nt/2,nx)) plot(fh*p0,fh,'ro','Markerface','r') plot([0 cxn],[0 cxn]/p0,'r',[-cxn cxn],cxn/p0+[0 2*cxn]/p0,'r',[-cxn cxn],3*cxn/p0+[0 2*cxn]/p0,'r','Linewidth',2) plot(2*cxn+[0 cxn],[0 cxn]/p0,'r--',2*cxn+[-cxn cxn],cxn/p0+[0 2*cxn]/p0,'r--',2*cxn+[-cxn cxn],3*cxn/p0+[0 2*cxn]/p0,'r--','Linewidth',2) plot(-2*cxn+[0 cxn],[0 cxn]/p0,'r--',-2*cxn+[-cxn cxn],cxn/p0+[0 2*cxn]/p0,'r--',-2*cxn+[-cxn cxn],3*cxn/p0+[0 2*cxn]/p0,'r--','Linewidth',2) legend(['F = ' num2str(fh) ' HZ'],'Location','NorthWest') if (ih == 1) title(['FN = 1/2/DT = ' num2str(fn) ' HZ, CXN = 1/2/DX = ' num2str(cxn) ' /M']) else plot(fh*p0-2*cxn,fh,'bo','Markerface','b') plot([0 fh*p0-2*cxn],[0 fh],'b','Linewidth',2), end set(gca,'Xlim',[-3*cxn 3*cxn],'Ylim',[0 fn],'YDir','reverse') plot([cxn cxn],[0 fn],'k',-[cxn cxn],[0 fn],'k','Linewidth',2) xlabel('CX (1/M)'), ylabel('F(HZ)') end