I am currently trying to solve a problem of the form:
cvx_begin
variable x(n)
minimize norm (A*x - b, 1) + myFun(x)
cvx_end
myFun takes the unknown variable and does a whole bunch of operations on it (gradients etc) using MATLAB’s in-built functions. Because x is initialized as type cvx, i am unable to perform MATLAB operations on it (e.g. gradient expects type double). How do I get around this?
Thanks,
Alex