Always remind me the Illegal operation: log( {convex} )

Uncategorized
Dec 1, 2020
H

this is my code zeta is variable
A1=power(delta,2)+(belta).*p2.*inv_pos(zeta);
R=log(A1)./log(2)
Ii dont know how to deal with this problem

M

Is zeta the only variable in A1? If so, it should be reformulable per the table in section 5.2.10 of https://docs.mosek.com/modeling-cookbook/expo.html#modeling-with-the-exponential-cone . Whether the convexity (concavity) goes in the “correct” direction" depends on how R` is being used in your problem.

H
Replying to #2

actually zeta is a slack variable ,and the A1 just the part of my goal function .in the matlab i need to deal this problem first

M

You haven’t provided enough information. The first thing you need to do is prove your optimization problem is convex.

H
Replying to #4

A1 is convex but after add the log ,this problem be the illgal operatrion :log({convex})

H
Replying to #4

i can upload my code ,whether ytou have enough time to deal this problem for me i will appreciate

M

Have you proven the problem is convex? That is your responsibility. if you need help on that, perhaps post at https://math.stackexchange.com/

H
Replying to #7

actually in A1 the variable is just the slack variable(zeta)

M

I ask you for the last time, have you proven this problem is convex? if so, the table i previously referenced should be of help.

H
Replying to #10

yes this function is convex

M

That’s good to know. So follow my tips and implement it in CVX.

H
Replying to #12

thanks for your advice :grinning: :grinning: