仿真用到cvx工具箱。遇到各种问题,以前没有记下来。现在想想还是非常有必要的。
错误使用 .* (line 173)
Disciplined convex programming error:
Cannot perform the operation: {positive constant} .* {real affine}
出错 * (line 36)
z = feval( oper, x, y );
出错 main (line 230)
buffer_cccp=buffer_cccp+log(1+P_0(n,u)*g_t(n,u)*g_r(n,u)*Hs(n,u+floor(N_UE/2))/(B_0(n,u)*sigma2))/log(10)*B(n,u) ...
常数乘以仿射函数本是没有问题的,但是一旦出现 Inf 或者 NaN,或者除以0,就会出现上述问题。