How to use "external" MATLAB functions in CVX?

These are non-convex functions. Please read Why isn’t CVX accepting my model? READ THIS FIRST! and the CVX Users’ Guide.