How can I compute the mean of an EMG signal that I loaded it in MATLAB?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ghazal Hnr
am 4 Mär. 2017
Kommentiert: Image Analyst
am 4 Mär. 2017
I loaded my signal and now I want to compute the mean and absolut of it, is there any code to do these?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 4 Mär. 2017
The mean() and abs() functions immediately spring to mind.
5 Kommentare
Image Analyst
am 4 Mär. 2017
Why did you think that? Did the practice question specifically say not to use the built-in mean() or sum() functions? If so, you can use a for loop:
theSum = 0;
for k = 1 : length(yourVector)
theSum = theSum + yourVector(k);
end
theMean = theSum / length(yourVector);
Or
theSum = theSum + abs(yourVector(k));
if you want the mean of the absolute value of the signal.
Weitere Antworten (1)
ThB
am 4 Mär. 2017
Just use
meanEMG = mean(EMG);
to compute a simple mean of an array. Or use
meanEMG = mean(mean(EMG));
if its a matrix
1 Kommentar
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!