MATLAB: How to use FFT in matlab using imported data in time domain excel file fft i have some polymers characterized by transmission terahertz time domain spectroscopy (THz-TDS). Best Answer Import the data into MATLAB using xlsread()Your data will be a Nx2 matrix in MATLAB with the first column the time data and the second column the data you want to Fourier transform.So for example:[X,TXT,RAW] = xlsread('yourfile.xls');xdft = fft(X(:,2)); Related SolutionsMATLAB: Use FFT in matlab and get phase plot Here are the frequencies associated with the output from FFT:Nt = % Number of time samplesFs = % sample frequency (= 1/dt)df = Fs/Nt; % frequency incrementNyq = Fs/2; % Nyquist frequencyif mod(Nt,2) == 0 % Nt is even freq = ifftshift(-Nyq : df : Nyq-df);else % Nt is odd freq = ifftshift([sort(-1*(df:df:Nyq)) (0:df:Nyq)]);endThen you can just do a xlim on the plot to zoom in on a specific frequency range. MATLAB: FFT of vibration data Fs = 800; % sampling rate of 1000 Hz t = 0:1/Fs:1-1/Fs; x = ad2; xdft = fft(x); xdft = xdft(1:length(x)/2+1); DF = Fs/length(x); % frequency increment freqvec = 0:DF:Fs/2; plot(freqvec,abs(xdft))I hope this can work Related QuestionAmplitude spectrumSampling frequency in fft analysis.
Best Answer