Why can't the code run if i just modify some variable and formula?

As I wrote above

Have you proven that your new version, specifically, how numerator is now defined, results in a convex constraint? That is your responsibility. I will mark it as non-convex unless and until you show it is convex.

Please carefully read Why isn’t CVX accepting my model? READ THIS FIRST! and the CXV Users’ Guide http://cvxr.com/cvx/doc/ .