The code works if the phase shift (p) is set to pi, but not for other values. Which makes me think I've made some goof with the maths and/or my fundamental understanding of this topic, rather than a simple MATLAB slip.
The two lines come from the fact that I want to keep the magnitude the...
What I want to do is apply a frequency-independent phase shift to a Gaussian Noise signal. Obviously I can just invert it to get a pi shift. Also I can take the Hilbert transform to get a pi/2 shift and I can invert that to give myself in effect a 3/2pi shift. BUT... what I want to do is to be...