I would like to see the output when an inpiut field passes through a diffuser and retraces its path through the same scattering medium. I have written the following code. Am I correct while retracing ? Please can someone advice me?
    1 次查看(过去 30 天)
  
       显示 更早的评论
    
clear all
close all
%define diffuser
diffuser=rand(100,100);
%define input phase matrix
Ein=exp(1i*rand(100,100));
%filed just after the diffuser
dback=diffuser.*Ein;
%field after first forward propagation
forwardfield=fftshift(fft2(dback));
%now to retrace the path i took the transpose of the forward field and then
%applied the fft to get the field just on the diffuser
forwarddield1=transpose(forwardfield);
bdiff=fftshift(fft2(forwarddield1));
%now to get the filed just after the diffudser multiplyied with the
%transpose of diffuser
Eout=bdiff.*transpose(diffuser);
0 个评论
采纳的回答
  Walter Roberson
      
      
 2017-5-2
        I am not familiar with diffusers, but it looks likely to me that you should be doing
bdiff = ifft2( fftshift(forwarddield1) );
In particular your forwarddield1 has already had fftshift() applied to an fft2, so doing an fft2() on that would not be an inverse operation even if the units were right.
2 个评论
  Walter Roberson
      
      
 2017-5-3
				Sorry, I have no idea how diffusers are modeled; I could just see that the shift was wrong.
更多回答(0 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Transforms 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

