Undefined function or method 'isfinite' for input arguments of type 'cvx'

ERROR message:

??? Error using ==> cvx.mtimes at 83
Disciplined convex programming error:
Invalid numeric values (NaNs) may not be used in CVX
expressions.
Error in ==> MatLinKDLOR_inL_outR at 36
minimize(
MatAlphaL’Mkk1Lt’invSwLMkk1LtMatAlphaL );

related CVX CODE:
Thank mcg for your warm-hearted answer and suggestion!

I just wanta replace all the “nan” and “inf” with numerals! because the value of neither nan nor inf is seemingly accepted in CVX optimization computation!? so how to do? thank mcg!

That is correct, those functions are not implemented for CVX variables. But they are not convex or concave functions, so under what circumstances would you expect CVX to accept them?

But again, why is there a NaN or Inf in a CVX variable? This doesn’t make sense. NaN’s and Inf’s are constants, and isinf/isnan/isfinite work fine for constants. The fact remains that these functions are not convex or concave, however, so they are inappropriate to use with CVX variables.

My suggestion: edit your question above, and include a snippet of CVX code that shows how isinf/isnan/isfinite could potentially be used without violating the DCP ruleset.

OK, the problem here is that there are NaN’s in the constant expression inside that quadratic form. In other words, in the product Mkk1Lt'*invSwL*Mkk1Lt.