Use matlab mex to operate CTP.