I encountered this example here, at around 13:00:
The video also shows how to define multiplication between a matrix and OneHotVector (it is just picking a row/column).
OneHotVector