width=8;

img=zeros(width,width);
img(1:width,1:(width/2)-1)=28;
img(1:width,(width/2):width)=30;






fimg=fftshift(fft2(fftshift(img)));


deltax=1e-3;
xshift=3*deltax;


sampinterval=1/(width*deltax);
[fx]=meshgrid((-width/2):1:((width/2)-1));
f=sampinterval*[fx];

dispfactor=exp(2*pi*i*f*xshift);

ffdisimg=dispfactor.*fimg;

unffdisimg=fftshift(ifft2(fftshift(ffdisimg)));


