%The phase and energy distribution of white noise plus some common signal clear; figure(1); clf; hold on; N=60; for ct=2, x=randn(N,1); y=randn(N,1); col='r'; if ct==2, y=x+y; end; fx=fftshift(fft(x)); fy=fftshift(fft(y)); fx=fx(1:end/2); fy=fy(1:end/2); ds=1/N; s=[0:ds:ds*(N/2-1)]'; axis tight; Pxy=abs(fx.*conj(fy)); phi=angle(fx.*conj(fy)); subplot(311); hold on; plot(x,'k'); plot(y,'r'); h=ylabel('realization'); font(h,16); h=xlabel('time'); font(h,16); font(gca,16); axis tight; subplot(3,1,[2 3]); hold on; for ct=1:N/2, polar([phi(ct) phi(ct)],[0 Pxy(ct)],[col,'.-']); end; h=ylabel('imaginary part of \Phi_{xy}'); font(h,16); h=xlabel('real part of \Phi_{xy}'); font(h,16); font(gca,16); grid on; axis equal; %axis tight; end;