Mean and Median Frequency, Total Power ,Peak Frequency
45 views (last 30 days)
Show older comments
I have three EMG signals, I found Time Doamin Features like RMS,Mean,STD etc..of that signal.Now I wolud like to find its Frequecy Doamin Fatures of those signal.
1 Comment
dpb
on 26 Jun 2022
Well, you'll have to start by defining what those domain features are...I would presume there are definitions in the literature on the subject matter, but you can't presume anybody else here is expert in the area.
Answers (1)
Ishaan Mehta
on 26 Jun 2022
Hi C PRASAD
I understand that you want to convert a time-domain signal to its frequency-domain form and analyze its properties.
You can use fast-fourier transform (fft) technique to convert your signal to frequency-domain.
For finding mean and median frequency, total power and peak power, I believe you can use MATLAB's meanfreq, medfreq, sum and max functions respectively.
Here is a code snippet for the same:
% generating a basic time-domain signal
Ts = 1/50;
t = 0:Ts:10-Ts;
x = sin(10*pi*t);
plot(t,x);
% converting to frequency domain using fft
y = fft(x);
fs = 1/Ts;
f = (0:length(y)-1)*fs/length(y);
plot(f,abs(y));
% power at each frequency
pow = y.*conj(y);
% mean and median frequency
meanFreq = meanfreq(y);
medianFreq = medfreq(y);
% total power
totalPower = sum(pow);
% peak frequency i.e. frequency at highest amplitude
[maxAmp, maxAmpIdx] = max(abs(y));
peakFreq = f(maxAmpIdx);
Hope it helps
Ishaan Mehta
0 Comments
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!