Outlining values of Stem FFT plot to create a trace profile.
Afficher commentaires plus anciens
I have converted accelerometer data into the frequency domain using a FFT in order to look for unique characteristics between different classes. I am trying to create an outline of FFT stem plot data for a computationally smoothed line rather than hand drawn lines for visual analysis. Any thoughts you have is greatly appreciated, thank you. Is it better to smooth and then plot over the stem or to filter the data?
I've included my code to show the frequency domain stem plot comparisons as well as a png of what I am trying to figure out with matlab.
load StavrosLeft.txt
load StavrosRight.txt
%% Stavros
figure
sgtitle('Stavros Accelerometer Frequency Domain')
sampfreq=62.5; %% sampling frequency
%Left Accelerometer
lengthStavrosLAY=length(StavrosLeft(:,4)); %length of force data for accelerometer in Y
FDStavrosLAY=(2/lengthStavrosLAY)*(fft(StavrosLeft(:,4))); %Transformation from time domain to frequency domain of accel data
faStavrosLAY=linspace(-sampfreq,sampfreq,lengthStavrosLAY); %creation of linearly spaced vector for the length of the domain between the frequency
subplot(2,1,1)
stem(faStavrosLAY, abs(FDStavrosLAY)) %plotting the FFT on the linspace
ylim([0,1])
ylabel('Amplitude Left')
xlabel('Frequency')
title('Y')
hold on
%Right Accelerometer
lengthSandRAY=length(StavrosRight(:,4));
FDStavrosRAY=(2/lengthSandRAY)*(fft(StavrosRight(:,4)));
faStavrosRAY=linspace(-sampfreq,sampfreq,lengthSandRAY);
subplot(2,1,2)
stem(faStavrosRAY, abs(FDStavrosRAY))
ylim([0,1])
ylabel('Amplitude Right')
xlabel('Frequency')
title('X')

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Digital Filter Analysis 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!
