From 7dc44825a17c6477f03492e3f47e535fa4e51cc9 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 16 Feb 2021 15:48:28 +0100 Subject: [PATCH] If applyremovesteps; WindowLen = size(dataAccCut,1) --- GaitOutcomesTrunkAccFuncIH.m | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/GaitOutcomesTrunkAccFuncIH.m b/GaitOutcomesTrunkAccFuncIH.m index 7fa4d7a..f8e0279 100644 --- a/GaitOutcomesTrunkAccFuncIH.m +++ b/GaitOutcomesTrunkAccFuncIH.m @@ -2,7 +2,7 @@ function [ResultStruct] = GaitOutcomesTrunkAccFuncIH(inputData,FS,LegLength,Wind % DESCRIPTON: Trunk analysis of Iphone data without the need for step detection % CL Nov 2019 -% Adapted IH feb-april 2020 +% Adapted LD feb 2021 (IH feb 2020) % koloms data of smartphone % 1st column is time data; @@ -73,7 +73,7 @@ end %% Step dectection -% Determines the number of steps in the signal so that the first 30 and last 30 steps in the signal can be removed +% Determines the number of steps in the signal so that the first 1 and last step in the signal can be removed if ApplyRemoveSteps @@ -90,9 +90,9 @@ if ApplyRemoveSteps LocsSteps = PksAndLocsCorrected(1:2:end,2); %% Cut data & remove currents results - % Remove 20 steps in the beginning and end of data - dataAccCut = dataAcc(LocsSteps(31):LocsSteps(end-30),:); - dataAccCut_filt = dataAcc_filt(LocsSteps(31):LocsSteps(end-30),:); + % Remove 1 step in the beginning and end of data + dataAccCut = dataAcc(LocsSteps(1):LocsSteps(end-1),:); + dataAccCut_filt = dataAcc_filt(LocsSteps(1):LocsSteps(end-1),:); % Clear currently saved results from Autocorrelation Analysis @@ -100,6 +100,9 @@ if ApplyRemoveSteps clear PksAndLocsCorrected; clear LocsSteps; + % Change window length if ApplyRemoveSteps (16-2-2021 LD) + WindowLen = size(dataAccCut,1); + else; dataAccCut = dataAcc; dataAccCut_filt = dataAcc_filt;