Square of frobenius norm

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


Happy new year

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

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.

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'))

1 Like

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

1 Like

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

1 Like