I don't quite understand this.Inv_pos can not be used correctly

for i=1:N %high boundary of 1/t3[n]
t3_lb(1,i)=inv_pos(t3(1,i));
end

for i=1:N %high boundary of 1/t2[n]
t2_lb(1,i)=inv_pos(t2(1,i));
end


t3_lb
87415160130094.6 87415160130081.7 87415160131461.3 87415160130701.5 87415160129994.6 87415160129985.0 87415160130805.5 87415160131386.3 87415160130077.7

We have no idea what t3 or t2 are, nor how t3_lb or t2_lb have been declared, if at all. Nor what error message or unexpected behavior you may have encountered.

If t3 is a MATLAB (not CVX) variable, i.e., has a numerical value, then t3_lb(1,i) will have a numerical value. if t3 is a CVX variable or concave or affine CVX expression, then inv_pos will not produce an error message, but the assignment to t3_lb(1,i) requires t3_lb to have been declared as an expr4ession holder (array) The Basics — CVX Users' Guide. Similarly with t2 and t2_lb.

help inv_pos

inv_pos Reciprocal of a positive quantity.
inv_pos(X) returns 1./X if X is positive, and +Inf otherwise.
X must be real.

 For matrices and N-D arrays, the function is applied to each element.

  Disciplined convex programming information:
      inv_pos is convex and nonincreasing; therefore, when used in CVX
      specifications, its argument must be concave (or affine).

After CVX has solved or inaccurate/solved, the CVX variables have their optimal values. But CVX expressions do not necessarily.correspond to the optimal values of CVX variables. CVX makes sure the expressions are properly evaluated for purposes of conducting the optimization and populating cvx_optval, but the numerical values of CVX expressions after CVX completes do not necessarily correspond to the optimal values of the variables. Therefore, you should recompute CVX expression values using the optimal values of CVX variables if you wish to know the optimal values of CVX expressions.

Does that resolve the “conflict” between t3 and t3_lb ?. Because it is an expression, if you want to know the “optimal” value of t3_lb, you must recompute it after CVX completes, using the “then” numerically populated value of t3 Doing so, there should be no conflict.

I don’t know why you commented out the expression declarations.

Thanks for your answer, Mark. I restate the expression, and in the final result, the value of t3 is a value greater than 1e8. Originally t3_lb is the reciprocal of t3, but it is indeed a value greater than 1e13 in the result. I don’t know why.

Do not use the value of t3_lb after CVX completes. You need to recompute it after CVX completes, using t3. However, the optimization should still have been performed correctly by CVX /solver, but the returned value of expressions may not be the final optimal value used internally in the optimization.

Also, although not the reason for the phenomenon you observed, the numerical scaling of your problem is terrible. Non-zero numbers many orders of magnitude different than one are not a good thing in double precision numerical optimization.

Okay Mark. The bad final result is probably because my own theory is not rigorous enough, I will check again. Thanks again, Mark