How to modify errors in my CVX code?
@Michal_Adamaszek 's refromulation at How to express the function "1/(exp(x^2)-1)" - #2 by Michal_Adamaszek works for your case.
Use 2^x instead of exp(x), and it can all be vectorized.
cvx_begin;
variable X(1,K) nonnegative
variable t(1,K) nonnegative
1 >= 2^(-X) + inv_pos(1+t)
% Use t in place of your g
cvx_end
Please check to make sure I didn’t make any mistakes.
As for the vec error, see https://ask.cvxr.com/t/cvx-not-running-quadratic-optimisation/8097/2and other posts in that topic.
Thank you very much for your reply! But this webpage link cannot be opened, I hope you can share it again.

