timeStamps2Vector

Converts a vector of time stamps into a one-hot coded vector.

You are now following this Submission

Accepts a vector of time stamps (e.g., drum hits, vowel onsets) and returns a one-hot coded vector ([0 0 0 0 1 0 0 0 1 0 1 ...]) version of the time stamps, for example, for use in machine learning applications. You can optionally specify a new sample rate if you need a different output Fs.

Cite As

Alexis Deighton MacIntyre (2020). timeStamps2Vector (https://www.mathworks.com/matlabcentral/fileexchange/73433), MATLAB Central File Exchange.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.1

Added attribution

1.0.0