MATLAB: Spatial Frequency fftspatial frequency Supposing i have a 1-D or 2-D data…how do i get the spatial frequencies from the FFT expression ( FFT results in a spectrum plotted against sample count).. Best Answer Hi, See this tutorial (which ImageAnalyst provided in an earlier post):http://sharp.bu.edu/~slehar/fourier/fourier.html Related SolutionsMATLAB: How to divide the signal to AC and DC component. After you calculateY = fft(signal,NFFT)/L;then Y(1) is the average DC component, and Y(2:end) have to do with the AC components. MATLAB: FFT of signal from text file I don’t see the error in your code, but the code here I wrote (plotting half of the fft) works:fidi = fopen('John Smith emg.txt', 'rt');T_EMG = textscan(fidi, '%f%f', 'Delimiter',' ');t = T_EMG{1};EMG = T_EMG{2};L = length(t);Ts = mean(diff(t)); % Sampling TimeFs = 1/Ts; % Sampling FrequencyFn = Fs/2; % Nyquist FrequencyFEMG = fft(EMG)*2/L; % Fourier Transform (Normalised)Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency VectorIv = 1:length(Fv); % Index Vectorfigure(1)plot(Fv, abs(FEMG(Iv)))grid Related Question
Best Answer