Documentation for time2delay (SPASS).

Conversion of times to delays for a non uniform signal


Description

The function time2delay converts times to delays for a non uniform signal. Useful in particular for the initialization of a non uniform signal.

Usage

delay = time2delay(time)
delay = time2delay(time,t0)

Arguments

time Times. Row vector.
t0 Initial time (of the first delay). Scalar. Optional.

Values

delay Delays. Row vector.

See Also

Example

  t = 10;          % signal duration
  t0 = 1.;         % initial time
  nbsamples = 10;  % number of samples
  times = t0+t*random('unif',0,1,1,nbsamples);
  times=sort(times); % time samples
  delay=time2delay(times,t0); % delay samples