I have strated learning and I am new to Matlab and fourier transform I am Struggling to understand the concept of the frequency vector and index vector in this code below. I will be grateful if someone can explain what is frequency vector (Fv) and index vector (Iv) and what the code for both at Fv, Iv and FTs_plot is doing.
L = numel(t); % Vector Length
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
FTs = fft(s)/L; % Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
FTs_plot = abs(FTs(Iv))/max(abs(FTs(Iv))); % Normalised Fourier Transform
Best Answer