Square of frobenius norm


(pop) #1

Hello
how can I define square of Frobenius norm of a matrix in CVX?

Thanks

Happy new year


(Mark L. Stone) #2

Show us exactly what you are trying to do (in context) and exactly what you tried.


(pop) #3

How can I define square of Frobenius norm in CVX complex domain? I tried this
sum_square_abs(Y) as a square of Frobenius norm. It gives me a vector instead of number.

I edited my last post.


(Mark L. Stone) #4

sum_square_abs(Y) produces a row vector consisting of the results per column of Y.

Use sum(sum_square_abs(Y)) to get what you want, which is equivalent to norm(Y,'fro')^2 (but the latter is not accepted by CVX).

Alternatively, you could use square_pos(norm(Y,'fro'))


(Michael C. Grant) #5

My recommendation is sum_square(vec(Y)), or sum_square_abs(vec(Y)) if Y is complex.


(Mark L. Stone) #6

mcg, I presume your recommendation is more efficient, but other than possible roundoff error differences, is mathematically equivalent to what’s in my answer?