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

CVX does not allow {convex} >= anything . You have violated that, whereas the version in my last post in Cannot perform the operation: {real affine} .* {convex},but i don't use the `.*` obeys CVX’s rules.

If you changed
numerator=square_abs(h_k{k}' * f_ki{j})
to
numerator=real(h_k{k}' * f_ki{k} * h_k{k})
which is the same as the previous thread except for using f_ki instead of Fk, the program would be accepted by CVX. even with the change made in your posit in this thread to how total is calculated.

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/ .