角速度のデータに対してFFTし、信号の周波数スペクトルを解析、ノイズの周波数範囲を特定、カットオフ周波数の決定をしたい。このコードが合っているか、またコードの追加・改善。
Afficher commentaires plus anciens
% Load the data
data = xlsread('ho130Gyrox.xlsx');
% FFT of data
N = length(data); % Length of data
Fs = 2000; % Sampling frequency
Y = fft(data); % FFT
Y_abs = abs(Y);
frequencies = (0:N-1)*(Fs/N)/1000; % Frequency axis
% Plot
figure;
plot(frequencies(1:N/2), Y_abs(1:N/2));
xlabel('Frequency (kHz)');
ylabel('Power(dB)');
title('Data Frequency Spectrum');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Sources dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!