Frequency response of a long signal I am trying to get the frequency response of a system, so, in theory I would need to do:
H = fft(y)./fft(x);

I have measured the system with a long stepped sine log sweep four times as I am planning to perform a spectral averaging to improve my SNR. This gives me a total of almost 5.000.000 samples per file. I have calculated the STFT of smaller chunks and averaged them as it looked like a too long signal to do an FFT. I used the cross spectrum and auto spectrum for that (I did the same procedure 4 times, one per audio file/repetition).
However I think that's not the correct way to go as I am averaging a non stationary signal. Should I just do an FFT of the whole signal? Isn't it too long? Do you have any idea of how I should proceed?
Thanks a lot in advance!
Assuming that the system response is smooth, without narrow peaks or narrow valeys. And that the spectrum of the input signal does not vary so much from one chunk to another.
I think this approach is better than doing a single FFT, as you know the FFT of a random signal will have lots of randomness. Averaging may also remove effects due to quantization errors.
Since the FFT bins are equally distributed in the spectrum, each bin corresponds to a very narrow band of your spectrum, and the energy in this band is highly dependent on the signal you used, or noise, if the FFT is big. In order to have a smooth curve you can compute the energy in a wider band by applying a moving average, for instance.