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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
sanjeev a
am 2 Mai 2017
Kommentiert: Walter Roberson
am 3 Mai 2017
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 2 Mai 2017
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 Kommentare
Walter Roberson
am 3 Mai 2017
Sorry, I have no idea how diffusers are modeled; I could just see that the shift was wrong.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!