add mat.c

Signed-off-by: yuzhongqiang <jy8yzq@163.com>