Matlab object serialization functions