EDIT
The first version of my question has not worked as I expected, so that I will try to be a little bit more specific.
The final goal I am trying to achieve is the generation of a ten minutes time series: to achieve this I have to perform an FFT
operation, and it's the point I have been stumbling upon.
Generally the aimed time series will be assigned as the sum of two terms: a steady component $U(t)$ and a fluctuating component $u^{'}(t)$. That is
$$u(t) = U(t) + u^{'}(t);$$
So generally, my code follows this procedure:
1) Given data
$time = 600 [s];$
$Nfft = 4096;$
$L = 340.2 [m];$
$U = 10 [m/s]$
$df = 1/600 = 0.00167 Hz;$
$f_{n} = Nfft/(2*time) = 3.4133 Hz;$
This means that my frequency array should be laid out as follows:
$$ f = (-f_{n}+df):df:f_{n} $$
But, instead of using the whole $f$ array, I am only making use of the positive half:
$$ f_{+} = df:f_{n} = 0.00167:3.4133 Hz; $$
2) Spectrum Definition
I define a certain spectrum shape, applying the following relationship
$$ S_{u} = \frac{6L/U}{(1 + 6f_{+}L/U)^{5/3}}; $$
3) Random phase generation
I, then, have to generate a set of complex
samples with a determined distribution: in my case, the random phase will approach a standard Gaussian distribution $(\mu = 0, \sigma = 1)$.
In MATLAB
I call
nn = complex(normrnd(0,1,Nfft/2),normrnd(0,1,Nfft/2));
4) Apply random phase
To apply the random phase, I just do this
$$ H_{u} = S_{u}*nn; $$
At this point start my pains!
So far, I only generated $Nfft/2 = 2048$ complex samples accounting for the $f_{+}$ content. Therefore, the content accounting for the negative half of $f$ is still missing. To overcome this issue, I was thinking to merge the $real$ and $imaginary$ part of $H_{u}$, in order to get a signal $H_{uu}$ with $Nfft = 4096$ samples and with all real values.
But, by using this merging process, the $0-th$ frequency order would not be represented, since the $complex$ part of $H_{u}$ is defined for $f_{+}$.
Thus, how to account for the $0-th$ order by keeping a procedure as the one I have been proposing so far?