I want to minimize $f(x) = \mathrm{Tr}(\sqrt{\mathbf{X}^{T}\mathbf{X}}\mathbf{A})$, where $\mathbf{X}$ is an matrix variable of dimension $d \times d$, and $\mathbf{A}$ is a known matrix. I tried the following code:cvx_begin    variable x(d,d)    minimize(trace(sqrt(sum_square_abs(x))*A))     subject to        x(sp_index) == M(sp_index)cvx_endHowever, there are still errors as following:Error using cvx/sqrt (line 61)Disciplined convex programming error:Illegal operation: sqrt( {convex} ).Error in Test_CVX_Iterative_Optimal (line 34)    minimize(trace(sqrt(sum_square_abs(x))*A)) So how should I solve this problem by CVX? Looking forward to your reply! I also asked the same question in the CVX forumhttp://ask.cvxr.com/question/2894but haven't got it solved yet. Wish anyone here is able to offer help!Update:Thanks to @DavidKetcheson , I should use sqrtm() rather than sqrt. To represent $\mathrm{Tr}(\sqrt{\mathbf{X}^T\mathbf{X}})$ I should use trace_sqrtm(sum_square_abs(x)). However, I need to represent $\mathrm{Tr}(\sqrt{\mathbf{X}^T\mathbf{X}}\mathbf{A})$, and I don't know how to represent it by a valid CVX expression.I tried minimize(trace(sqrtm(sum_square_abs(x))*A))to replace sqrt in the original, but I got the following errorUndefined function 'schur' for input arguments of type 'cvx'.Error in sqrtm (line 32)[Q, T] = schur(A,'complex');  % T is complex Schur form.Error in Test_WeightNucNorm (line 35)        minimize(trace(sqrtm(sum_square_abs(x))*A))I understand now that sqrtm() function is not implemented in CVX, so I have the error ' Undefined function 'schur' for input arguments of type 'cvx'.'. But my problem is still not solved.I think I should use:minimize(trace_sqrtm(sum_square_abs(x))*A)But I still get error:Error using cvx/trace_sqrtm (line 9)Input must be affine.Error in Test_WeightNucNorm (line 40)        minimize(trace_sqrtm(sum_square_abs(x))*A)---------- Important updateThanks to @k20 , I made a mistake!! This is not the weighted nuclear norm of matrix $\mathbf{X}$, but the weighted trace of $\sqrt{\mathbf{X}^T\mathbf{X}}$!! Now my problem becomes that:how to represent the weighted nuclear norm of a matrix $\mathbf{X}$, where $\mathbf{X}$ is CVX variable, $\mathbf{A}$ is a diagonal weight matrix.  I tried to find a CVX function which give me all the singular values of variable $\mathbf{X}$, but I haven't found such a function.
How to represent weighted nuclear norm of matrix variable X and minimize it by CVX function, or solve it by other possible packages
cvx
I'm going to boldly say that you are doing it wrong, because your goal is to minimize a weighted nuclear norm but your equations don't agree.  The nuclear norm is the sum of singular values.  The weighted nuclear norm is the weighted sum of singular values.  If your matrix A is intended to be the diagonal matrix of singular value weights, then I don't think your equation represents the correct weighted sum.The response to the question http://ask.cvxr.com/question/1708/maximize-the-minimum-singular-value/ suggests that the minimum singular value is not a convex or concave function so cvx can't deal with it.  Therefore it seems unlikely that cvx can deal with an arbitrary weighted sum of singular values, as would be required by a weighted nuclear norm.