Hi, I am trying to make a calculation by taking the first deriviative without success, I've tried the next couple of methods:
%%%the data is a seismic shot gather
%%%size(data_TX,1)=1001 (number of time samples)
%%%siz (data_TX,2)=256 (number of increments)
data_FK=fft2(data_TX); % setting the the time and spacial freq vectors
fq=linspace(0,1/dx,size(data_TX,1)-1/2*dt); kx=linspace(0,1/dy,size(data_TX,2)-1/2*dx); %1 method
[FQ,KX]=meshgrid(ifftshift(fq),ifftshift(kx)); Dt_data_FK=2i*pi*FQ.*data_FK; Dx_data_FK=2i*pi*KX.*data_FK; %in this case I need to transpose the matrices
FQ=FQ'; KX=KX'; Dt_data_FK=2i*pi*FQ.*data_FK; Dx_data_FK=2i*pi*KX.*data_FK; Dt_data_TX=ifft2(Dt_data_FK); Dx_data_TX=ifft2(Dx_data_FK); %I get in this case a complex data set ?
%2nd method
data_FK=fftshift(fft2(data_TX)); Dt_data_FK=2*pi*1i*diag(fq)*data_FK; Dx_data_FK=2*pi*1i*data_FK*diag(kx); Dt_data_TX=ifft2(ifftshift(Dt_data_FK),'symmetric'); Dx_data_TX=ifft2(ifftshift(Dt_data_TX),'symmetric');
note: I need to make the calculation for a cube CUBE(k,j,i), k=1001 time samples, j=256 recievers,i=256 shots.
I tried at first to use fftn but all ways produced me with wrong results. the theory is right but i'm not sure exactly how to take the derivative.
Best Answer