资源简介

计算肌电信号积分肌电值,均方根值,中值频率,平均功率频率

资源截图

代码片段和文件信息

s= load(‘09121052HF.CSV‘);
fs=3000;
x1=s(1:163841);
x2=s(1:163842);
x3=s(1:163843);
x4=s(1:163844);
x5=s(1:163845);
x6=s(1:163846);
iemg1=sum(abs(x1))/length(x1)
iemg2=sum(abs(x2))/length(x2)
iemg3=sum(abs(x3))/length(x3)
iemg4=sum(abs(x4))/length(x4)
iemg5=sum(abs(x5))/length(x5)
iemg6=sum(abs(x6))/length(x6)   %求积分肌电值
rms1=sqrt(sum(x1.^2)/length(x1))
rms2=sqrt(sum(x2.^2)/length(x2))
rms3=sqrt(sum(x3.^2)/length(x3))
rms4=sqrt(sum(x4.^2)/length(x4))
rms5=sqrt(sum(x5.^2)/length(x5))
rms6=sqrt(sum(x6.^2)/length(x6))  %求均方根值
L1=length(x1);
cx1=xcorr(x1‘unbiased‘);
cxk1=fft(cx1L1);
px1=abs(cxk1);%求功率谱密度
pxx1=10*log10(px1);
f1=(0:L1-1)*fs/L1;
subplot(321)plot(f1(1:L1/2)pxx1(1:L1/2))
xlabel(‘频率/Hz‘);ylabel(‘功率谱/dB‘);
title(‘平均功率谱图‘);
grid on  %做功率谱图
df1=

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4317  2009-12-10 10:16  MFMPF.m

----------- ---------  ---------- -----  ----

                 4317                    1


评论

共有 条评论