Optimizing on an Identity Matrix and tracking the convergence

Why do you show RLearning? It is never used.

The statement D=Diff(X,R,B);, even though it appears after cvx_begin, has nothing to do with CVX, and must be executed based on whatever MATLAB variable R had already been set as R. Similarly, the statement Obj_var=square_pos(norm(D,‘fro’))+alphatrace(transpose(D)LD)+gamma(square_pos(norm(R,‘fro’))); has nothing to do with CVX, because it does not involve any CVX variable or expressions.

When R is later declared as a variable, that variable R has NO relation to any previous R, and supersedes it. You can;t initialize CVX variables. CVX and the solver figure out what their optimal values are.

As for your used of Diff, I have no idea how that’s supposed to relate to the problem (P1). Is that what the script D is? But what about D(X)=X-RXB? BTW, P1 is written in a strange way, listing Q = ... after s.t, even though it is not a constraint,. Fortunately, you seemed to handle that correctly.

Problem P1 appears to have L, Omega, and R as variables.yet R is your only declared CVX variable. When you add L as a variable, you need to also include trace(L) == N in your program.

Bottom line: I have no idea what P1 means. it looks very strange. If I believe all of L, Omega, R are CVX (optimization) variables, it appears to not be convex, unless the true meaning is different than what it looks like to me.

So I’d say at this point, you need to understand the problem, including what are optimization variables vs. input data. And to use CVX, that optimization problem needs to be convex. Figuring that out is your homework assignment.

Before embarking on that assignment, please carefully read, and take to heart,