フィルターのクリア

How can I compute the mean of an EMG signal that I loaded it in MATLAB?

3 ビュー (過去 30 日間)
Ghazal Hnr
Ghazal Hnr 2017 年 3 月 4 日
コメント済み: Image Analyst 2017 年 3 月 4 日
I loaded my signal and now I want to compute the mean and absolut of it, is there any code to do these?

採用された回答

Image Analyst
Image Analyst 2017 年 3 月 4 日
The mean() and abs() functions immediately spring to mind.
  5 件のコメント
Ghazal Hnr
Ghazal Hnr 2017 年 3 月 4 日
編集済み: Ghazal Hnr 2017 年 3 月 4 日
I just want the mean of signal but I thought I can't use mean for a signal, it is a practice for one of my lessons. Thank you for your help
Image Analyst
Image Analyst 2017 年 3 月 4 日
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.

サインインしてコメントする。

その他の回答 (1 件)

ThB
ThB 2017 年 3 月 4 日
Just use
meanEMG = mean(EMG);
to compute a simple mean of an array. Or use
meanEMG = mean(mean(EMG));
if its a matrix
  1 件のコメント
Ghazal Hnr
Ghazal Hnr 2017 年 3 月 4 日
編集済み: Ghazal Hnr 2017 年 3 月 4 日
it is a vertical vector, is it ok to use these codes for it? when I use mean the obtained answer is negative, isn't it a problem?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by