implemented sendMat by sending object

add simple example of sendMat and getMat