Extend time series data to given number of timesteps
extendts(x,ts,v) takes these values,
Neural network time series data
Number of timesteps
and returns the time series data either extended or truncated to match the specified number of timesteps. If the value v is specified, then extended series are filled in with that value, otherwise they are extended with random values.
Here, a 20-timestep series is created and then extended to 25 timesteps with the value zero.
x = nndata(5,4,20); y = extendts(x,25,0)