How to define nuclear norm in matlab?

55 views (last 30 days)
I am trying to write nuclear norm in programmin but difficult to define.Can suggest some solution?

Accepted Answer

John D'Errico
John D'Errico on 9 May 2019
Edited: John D'Errico on 9 May 2019
What is difficult to program? A quick search online suggests it is the L-1 norm of either the vector of singular values, or of the vector of eigenvalues. It depends if your matrix is square or not.
This is simple to write however. Use eig (or svd) as you wish. Then call norm (with the correct norm) and you are done. WTP? Thus it can be written in one line. A short one, in fact.
nucnorm = norm(svd(A),1);
Or
nucnorm = norm(eig(A),1);
On a given square matrix, the two solutions will return different numbers, but will still be valid, in context of the apparent common use for this norm, that of finding a low rank matrix. (I won't bother to make the arument that this tends to induce a low rank matrix, since that is your choice to make anyway, and I don't even know if this is why you wish to compute this matrix norm.)
On a square matrix, it would appear that you might decide whether to use eig or svd in that call. Again, either seems appropriate, though svd seems generally to be faster. And since svd is neccesary for a non-square matrix, it makes sense that svd is the better choice.

More Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!