Effacer les filtres
Effacer les filtres

Please, How do I determine the Mean Absolute Value (MAV) of an acoustic signal, which has positive and negative data points?

31 vues (au cours des 30 derniers jours)
Please, How do I determine the Mean Absolute Value (MAD) of an acoustic signal, which has positive and negative data points?
Is it possible to dermine it straightforward with this code:
MAV = mean(abs(signal));
However,
I came across, this code which I modified with my signal. My signal length is 13,230,000 data point, fs = 44100, time 300 sec.
xrec = S_ff_1500W_data3_50; % replace for your signal and Fs
N=length(xrec); %xrec is my ecg signal
A= 300*fs; % step 1
seg = xrec(1:A);
seg = seg/max(abs(seg)); % step 2
% Step 3
Y=0;
for i=1:A
Y=Y+max(abs(seg(i)));
end
MAV=(1/A)*Y
% more efficient Step 3
MAV = mean(abs(seg(1:A)))
Please, any explanation?
  2 commentaires
Adam Danz
Adam Danz le 20 Jan 2021
Modifié(e) : Adam Danz le 21 Jan 2021
> Is it possible to dermine it straightforward with this code: MAV = mean(abs(signal));
Yes. That line describes the mean absolute value.
The code you shared appears to take a subsection of the input and then normalizes it by the maximum absolute value (not the mean). I don't know what the for-loop is doing.
Kwaku Owusu
Kwaku Owusu le 20 Jan 2021
Your information is worth sharing. Thank you very much Adam.

Connectez-vous pour commenter.

Réponses (2)

Star Strider
Star Strider le 20 Jan 2021
The mean value is the ‘average’ value. In almost all audio signals, the mean value is either 0 or close to 0.
An electrocardiogram signal will have a mean value different than 0 (depending on the lead), since (in most leads) there is generally postive (or negative) deflection that creates a non-zero mean value. See Braunwald’s Heart Disease for an extensive explanation.
  2 commentaires
Star Strider
Star Strider le 20 Jan 2021
My pleasure!
The mean absolute value of a EKG should not be much different than the mean of the original EKG in leads and . It will be the opposite sign (positive) in lead and and the right precordial leads , and in all leads wher it has a normally near-isoelectric mean. These will obviously not hold in the presence of cardiac disease. There is absolutely no reason to calculate the mean absolute value of an EKG, since that obscures necessary information. If you want to get an estimate of the power (although the reason to do that escapes me), either square it, or more reliably, take the RMS (root-mean-square) value of the vector. Again, see Braunwald for an extensive discussion.

Connectez-vous pour commenter.


Image Analyst
Image Analyst le 20 Jan 2021
Not sure what you mean by "Mean Average Signal" - that's kind of redundant isn't it. Mean and Average mean the same thing. What your code does is compute the "mean of the absolute value of the signal" which will be greater than zero (unless your signal is exactly zero everywhere). Like Star said, the Mean Signal of an acoustic signal will usually be very close to zero because the number of positive values and negative values is about the same. But if you take the absolute value, those negative values flip to the positive side so the mean (or average - same thing) of the absolute value of the signal will be greater than zero. But an ecg is not like an ordinary acoustic signal like an audio waveform of your favorite song, so the mean of an ecg signal will probably be positive even if you don't take the absolute value. Star is a physician so he can correct me if I'm wrong.
  1 commentaire
Kwaku Owusu
Kwaku Owusu le 20 Jan 2021
Sorry for the I rather mean, the 'Mean Absolute Value'. I have now corrected it.Thank you very much for drawing my attention.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Audio Processing Algorithm Design dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by