Skip to main content
. 2024 Feb 8;24(4):1129. doi: 10.3390/s24041129
Algorithm 1 Signal_Segment (Sigorg, Lw, dw)

Inputs:

Sigorg—original time-domain signal

Lw—width of sliding window

dw—moving step length of sliding window

Outputs:

Matwindow—data window matrix

 

1: Calculate cl

2: Initialize Matwindow

3: for i=1 to cl do

4: if i=1

5: Assign the data from 1 to Lw in Sigorg to the ith column of the Matwindow.

6: else if i!=cl

7: Assign the data who are located from the (idw+1)th to the (idw+1+Lw)th in Sigorg to the ith column of Matwindow.

8: else

9: Assign the data who are located from the (idw+1)th to the end of Sigorg to the ith column of Matwindow and replace the Null in the ith column with 0.

11: End if

12: End for