I need to add a random phase shift to a vector. What can I use to create a complex random variable with unity amplitude and a uniform phase distribution over [0,2pi)?
Thank you!
Best Answer
n = 1000; % generate n complex numbers
mag = 1; % magnitude of complex numbers
phases = rand(1, n)*2*pi; % phases of complex numbers from 0 to 2*pi
Best Answer