I have a dataset of the responses of a dynamic system in a time- domain. The signal is 1 second long and sampling frequency is 2000 Hz. I have 100 of different system configurations, meaning that my dataset has the shape of 2000×101, where the column 1 represents time and the rest columns are reponses of the system. How to perform FFT analysis for each signal and save obtained signals in frequency- domain to the new dataset? By this moment I can perform FFT only for 1 signal, the code is below. Obviously, for loop is need for this operation, but I don't have much experience to implement it for this problem.
%load data
Data = Data4FFT(:,2);Time1= Data4FFT(:,1);L = numel(Data); Fs = 2000; Fn = Fs/2; Ts = 1/Fs; t = linspace(0, L, L)*Ts; FTS = fft(Data)/L; FvHz = linspace(0, 1, fix(L/2)+1)*Fn; Iv = 1:numel(Fvrs); figure(2)plot(FvHz, abs(FTS(Iv))*2)gridxlabel('Frequency (Hz)')ylabel('Amplitude')title('Response in Frequency Domain')
Best Answer