Matlab问题,关于仿射函数乘以一个凸函数不符合cvx规则

Blockquotefunction f = factor_31b2(PA,rou_0,v,f,M,N)

for n=1:1:N
    
    r=(rou_0^2)*M^2*PA(1,n);
    f(1,n)=r*inv_pos(v(1,n));%(第1行的第n列)
  

end

end
提示错误Disciplined convex programming error:
Cannot perform the operation: {real affine} .* {convex}
提示f(1,n)这一行不太符合规则

You violated CVX’s rules. But I can’t determine whether your optimization problem is convex, because you don’t show what is done with f.

The first thing you should do is determine whether your optimization problem is convex.