MATLAB: How to Apply FFT on CVS file.

fft on csv file.

I am Begnier and have no idea how to apply fast fourier transform. I have vibration data with three columns and it is very large data (length of 215997 )
I want to apply Fast fourier transform on it. I don't know how to start and where to strat.
I collected this data by running my pump 6 hours.

Best Answer

This will get you started:
[D,S] = xlsread('dry pump_6h data_acceleration.csv');
t = D(:,1);
Accel = D(:,2:end);
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = size(D,1); % Data Vector Length
FT_Accel = fft(Accel-mean(Accel))/L; % Subtrace Constant Offset & Calculate Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
figure
subplot(3,1,1)
plot(Fv, abs(FT_Accel(Iv,1))*2)
title(S{1})
grid
subplot(3,1,2)
plot(Fv, abs(FT_Accel(Iv,2))*2)
title(S{2})
grid
subplot(3,1,3)
plot(Fv, abs(FT_Accel(Iv,3))*2)
title(S{3})
xlabel('Frequency')
grid