the amount of time between the onset of the tone and the onset of muscle contraction in EMG signal
조회 수: 1 (최근 30일)
이전 댓글 표시
Hey, I have an EMG signal data and i need to determine the amount of time between the onset of the tone and the onset of muscle contraction. I am thinking of using a voltage threshold function to determine when the tone was played and breaks the EMG recorded signal (filtered and half-wave rectified) into epochs when the bicep contracted for each stimulus trial, but i am not sure how to acheive it.
I have this code as a start:
clear all;
Exp1 = load('EMG1.mat'); %load file
Fs = 10000; %sampling rate
Duration = 1.5; %Duration of each epoch
DurSamps = Duration*Fs; %Duration in samples
Reps = 14; %number of epochs
%define blank matrices
Tones(1:Reps,1:DurSamps)=0; EMGRaw(1:Reps,1:DurSamps)=0; EMGFilt(1:Reps,1:DurSamps)=0; EMGFiltRect(1:Reps,1:DurSamps)=0;
%read data from structure
for Rep=1:Reps
Tones(Rep,:) = Exp1.data(Exp1.datastart(1,Rep):Exp1.dataend(1,Rep)); EMGRaw(Rep,:) = Exp1.data(Exp1.datastart(2,Rep):Exp1.dataend(2,Rep)); EMGFilt(Rep,:) = Exp1.data(Exp1.datastart(3,Rep):Exp1.dataend(3,Rep));
end
for i=1:Reps
for j=1:DurSamps
EMGFiltRect(i,j)=EMGFilt(i,j).^2; %half-wave rectification
end
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!