Thank you for your sharing code. I wonder that if you use FFT to transform frequency matrix to time series correlty. The code you written is as follows:
for ii = 1:N
tmp_u = (fft((H_u(ii,:)))); % FFT
tmp_v = (fft((H_v(ii,:))));
tmp_w = (fft((H_w(ii,:))));
% Up to this point only the one-sided spectrum has been considered to
% lighten the computational effort, since the double-sided spectrum is
% an even function about the frequency axis.
% Therefore, we can now merge real and imaginary part of the fft to get
% the ultimate time series.