[matlab] cleaned up code, added struct docs

cleaned up code, added struct docs, rearranged some items for readability. 
Searches for a command __in all other commands__ does not make sense to me. Could this be reworded?