Skip to content

Commit

Permalink
Add missing asm and ass
Browse files Browse the repository at this point in the history
  • Loading branch information
JingweiToo committed Dec 12, 2020
1 parent 36fb8c5 commit ccdf914
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
17 changes: 17 additions & 0 deletions jAbsoluteValueOfTheSummationOfExpRoot.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
%[2018]-Pattern recognition of electromyography signals based on novel
%time domain features for amputees’ limb motion classification" (3)

function ASM = jAbsoluteValueOfTheSummationOfExpRoot(X,~)
K = length(X);
Y = 0;
for n = 1:K
if n >= 0.25 * K && n <= 0.75 * K
exp = 0.5;
else
exp = 0.75;
end
Y = Y + (X(n) ^ exp);
end
ASM = abs(Y / K);
end

8 changes: 8 additions & 0 deletions jAbsoluteValueOfTheSummationOfSquareRoot.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%[2018]-Pattern recognition of electromyography signals based on novel
%time domain features for amputees’ limb motion classification" (1)

function ASS = jAbsoluteValueOfTheSummationOfSquareRoot(X,~)
temp = sum(X .^ (1/2));
ASS = abs(temp);
end

6 changes: 3 additions & 3 deletions jfemg.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
% Feature Extraction Toolbox by Jingwei Too - 11/12/2020
% Feature Extraction Toolbox by Jingwei Too

function feat = jfemg(type,X,opts)
switch type
case 'fzc' ; fun = @jNewZeroCrossing;
case 'ewl' ; fun = @jEnhancedWaveLength;
case 'emav' ; fun = @jEnhancedMeanAbsoluteValue;
case 'ass' ; fun = @jAbsoluteValueOfTheSummation;
case 'asm' ; fun = @jAbsoluteValueOfTheSummationOfSquareRoot;
case 'asm' ; fun = @jAbsoluteValueOfTheSummationOfExpRoot;
case 'ass' ; fun = @jAbsoluteValueOfTheSummationOfSquareRoot;
case 'msr' ; fun = @jMeanValueOfTheSquareRoot;
case 'ltkeo' ; fun = @jLogTeagerKaiserEnergyOperator;
case 'lcov' ; fun = @jLogCoefficientOfVariation;
Expand Down

0 comments on commit ccdf914

Please sign in to comment.