Skip to main content
. 2020 Dec 26;21(1):106. doi: 10.3390/s21010106
Algorithm 1: Sliding Window.
Input: the pre-processed sensing data S˜seq={s˜i|i=1,2,…,nseq }, window size ws, the starting point of the segment sp, ending point of the segment ep, sliding samples ss
Output: a set of segments W={wj|j=1,2,…,nsl }
1: Begin
2: initializesp←1, ep←ws and j←1
3: while ep≤nseq do
4:           wj←{s˜spj,s˜sp+1j,…,s˜ep−1j,s˜epj}
5:                   W←wj
6:                  j←j+1
7:                 sp←sp+ss
8: ep←sp+ws−1
9: endwhile
10: End