How to determine muscle activation timing of an emg signal?
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Are there any matlab toolboxes to determine onset and offset of an emg signal in order to evaluate muscle activation timing?
1 commentaire
H W
le 26 Nov 2022
Biceps = [10 : 35];
Triceps = [100 : 200];
figure;
polarplot(Biceps*pi/180, 0.7*ones(size(Biceps)), 'y', 'LineWidth',1.5);
hold on;
polarplot(Triceps*pi/180, 0.5*ones(size(Triceps)), 'g', 'LineWidth',1.5);
hold off;
set(gca,'ThetaZeroLocation','bottom', 'RLim',[0 1]);
legend('Biceps', 'Triceps', 'Location','NorthEastOutside');
Réponses (1)
MarKf
le 27 Nov 2022
% emg = timeseries;
% Fs = sampling frequency
% Fn = Nyquist frequency, Fs/2;
% filter, hilbert and boxcar
[B, A] = butter(6, 10/Fn, 'high'); % 6th order butterw 10hz highpassfilter
emgflt = filtfilt(B, A, emg); % twopass
emghlb = abs(hilbert(emgflt)); % hilbert transform
emgcnv = conv2([1], ones(1,Fs), emghlb, 'same'); % smooth using convolution
emgstd = (emgcnv - repmat(mean(emgcnv), 1, length(emgcnv))) ./ ...
repmat(std(emgcnv), 1, length(emgcnv)); % z-transform
emgtrl = emgstd>0; % detect the muscle activity
emgtrl = diff(emgtrl, [], 2);
emgon = find(emgtrl(:)== 1);
emgoff = find(emgtrl(:)==-1);
0 commentaires
Voir également
Catégories
En savoir plus sur Discrete Fourier and Cosine Transforms 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!