Undefined function 'log2' corresponding to input parameter of type 'CVX'

  for n=1:N

dd_ue(n) is a variables, 'Undefined function ‘log2’ corresponding to input parameter of type ‘CVX’ ',How to solve this problem? Thanks u very much

log2(x) = log(x)/log(2)

log(x) is supported by CVX for concave x, even though log2(x) is not.

However, noise(n) is convex, and is not accepted as an argument of log, so you will need a more complicated reformulation, One way presuming R(n) is used in a convex fashion in your program, is to apply the first log–sum-inv solution in section 5.2.7 of https://docs.mosek.com/modeling-cookbook/expo.html 9 . with dd_ue(n)/2 as x.

variables s(N) t(N) y(N)
for n = 1:N    
    t(n) >= log_sum_exp([0 y(n)])
    dd_ue(n)/2  >= exp(-y(n))
    R2(n) = t(n)/log(2);

Thank you very much for your timely reply, which has helped me a lot. Wish you all the best!