Blame |
Last modification |
View Log
| RSS feed
function VibTestSpec
(file
)
% Read logfile
log=csvread
(file
);
fs=
11111;
% Sample freq
for col=
1:
10
% Take one of the measurements
inSignal=
log(:,col
)';
inSignal = inSignal -
mean(inSignal
);
n=
length(inSignal
);
% Take FFT
FFT =
fft(inSignal
);
%spec = FFT.*conj(FFT)/n
spec =
abs(FFT)/n;
spec = spec
(1:n/
2);
specs
(:,col
) = spec;
end
f =
int32(fs/n*
(0:n/
2-
1));
% Freq
plot(f,specs
);
title('Spectrum');
xlabel('Hz');
axis([1 400 0 15])