cr.nimble.dsp.time_values¶
- cr.nimble.dsp.time_values(fs, T, initial_time=0, endpoint=False)[source]¶
Returns a sequence of time values sampled at a specific frequency for a specific duration
- Parameters
- Returns
A 1D array of time values
- Return type
jax.numpy.ndarray
Example
>>> fs=2 # Hz >>> T = 4 # Sec >>> cr.nimble.dsp.time_values(fs, T) DeviceArray([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5], dtype=float32) >>> cr.nimble.dsp.time_values(fs, T, endpoint=True) DeviceArray([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. ], dtype=float32) >>> cr.nimble.dsp.time_values(fs, T, initial_time=-2, endpoint=True) DeviceArray([-2. , -1.5, -1. , -0.5, 0. , 0.5, 1. , 1.5, 2. ], dtype=float32)