interp_linear¶
- interp_linear(prev_data: Tensor, next_data: Tensor, sample_at: Tensor, step_time: float, **kwargs) Tensor[source]¶
Interpolates between previous and next states linearlly.
\[D(t_s) = D(0) + \left( \frac{D(\Delta t) - D(0)}{\Delta t} \right)t_s\]- Parameters:
prev_data (torch.Tensor) – most recent observation prior to sample time, \(D(t=0)\).
next_data (torch.Tensor) – most recent observation subsequent to sample time, \(D(t=\Delta t)\).
sample_at (torch.Tensor) – relative time at which to sample data, \(t_s\).
step_time (float) – length of time between the prior and subsequent observations, \(\Delta t\).
- Returns:
interpolated data at sample time, \(D(t=t_s)\).
- Return type: