MikroKopter.de
Wiki
SHOP
Datenschutz
Impressum
Projects
BL-Ctrl
FlightCtrl
MK3Mag
NaviCtrl
Català-Valencià – Catalan
中文 – Chinese (Simplified)
中文 – Chinese (Traditional)
Česky – Czech
Dansk – Danish
Nederlands – Dutch
English – English
Suomi – Finnish
Français – French
Deutsch – German
עברית – Hebrew
हिंदी – Hindi
Magyar – Hungarian
Bahasa Indonesia – Indonesian
Italiano – Italian
日本語 – Japanese
한국어 – Korean
Македонски – Macedonian
मराठी – Marathi
Norsk – Norwegian
Polski – Polish
Português – Portuguese
Português – Portuguese (Brazil)
Русский – Russian
Slovenčina – Slovak
Slovenščina – Slovenian
Español – Spanish
Svenska – Swedish
Türkçe – Turkish
Українська – Ukrainian
Oëzbekcha – Uzbek
Subversion Repositories
Projects
(root)
/
VibrationTest
/
branches
/
v1.2
/
Misc
/
Matlab
/
VibTestSpec.m
- Rev 695
Rev
Rev 588
|
Blame
|
Compare with Previous
|
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
]
)