Padding and Cutting
Overview
This operation increases or decreases the signal length by scaling the signal to the desired number of data points before zero and after zero.
Required Inputs
- Time History Signal
- Desired number of data points before zero
- Desired number of data points after zero
Calculation
- Checks if number of points before and after zero are greater or equal to zero (error will be raised in input is negative)
- Calculates the time step (time between each data point)
- Calculates number of data points that need to be added or removed from signal
- If adding points to signal, the beginning of the new signal is padded with the value of the first point of the original signal
- Adjusts signal and time values
Padded Signal Example