- #1

tworitdash

- 80

- 18

Process 1:

Matlab:

`S = m0/sqrt(2*pi*sigma^2) * exp(-(vel_axis - mu).^2/(2*sigma^2));`

Then, with the help of random phase generators and using an inverse Fourier transform, I calculate the time domain signal of this spectrum.

Matlab:

`s = ifft(fftshift(sqrt(N) .* sqrt(S) .* exp(1j .* Theta))); %timedomain`

Process 2:

Now, I want to change the phase of the signal in the time domain to see the changes again in frequency domain.

Matlab:

`s_modified_in_time_domain = abs(s) .* exp(1j .* unwrap(angle(sig)) .* (-1))`

Process 3:

Instead of doing the modification in the time domain, if I modify it in process 1 and in the equation of S, if I use -mu, instead of mu I get the desired result.

Therefore, I don't know why I get a shift in the plot of Process 2. Any idea if the equation for lower case s (equation number 2) does something weird?

In the plot: Blue is process 2 in the frequency domain Red is Process 1 with mu = 5 Yellow is Process 1 with mu = -5

The Blue plot should resemble the Yellow plot but it shifted towards the right. I want to do the change in the time domain and see the effect in the frequency domain. How can I use Process 2 in a good way. Just to show this effect I have used N as 4. So, it is very poorly sampled.

The code is done in MATLAB. This is just the idea. the code is lengthy with other things.