필터 지우기
필터 지우기

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);

채택된 답변

Walter Roberson
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
sanjeev a
sanjeev a 2017년 5월 2일
Thanks Walter. Yes you are right. I would like to clarify one more thing. Bascially my setup is like I have a diffuser then screen which directs back the filed through the same diffuser. So just after applying the ifft , shouldn't we take the transpose of it and multiply with the transpose of the diffiser? I am not sure. I am just asking if I am correct
Walter Roberson
Walter Roberson 2017년 5월 3일
Sorry, I have no idea how diffusers are modeled; I could just see that the shift was wrong.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by