Solve for diagonal matrix D by minimizing the operator norm in Matlab

Capture22.PNG
Say that the size of matrix is ​​576x576 and size of F is1296x576.
Which matlab function can I use to solve this problem?

1 Comment

You can improve responsiveness to your posts if you Accept-click valid answers to your previous questions.

Sign in to comment.

 Accepted Answer

fminunc, fmincon and family.

8 Comments

How exactly? Could you please give me an example?
A = ...;
F = ...;
D0 = ones(n,1)
D = fminunc(@(x)fun(x,A,F),D0)
function obj = fun(D,A,F)
obj = norm(A-F'*diag(D)*F,2)
% obj = norm(A-F'*diag(D)*F,inf)
end
Could you please clarify why do your write diag(D) instead of just D while defining the objective function?
fminunc (and all optimization function) accept vector as input, DIAG transform to matrix.
Thanks for the response. So you mean, fminunc vectorizes the matrix before solving? If it vectorizes the matrix, then I am not sure if minimizing the 2-norm of a vector is same as minimizing the 2-norm of a matrix. In that case, do you have any idea how do I solve this problem? t
You misunderstood. The unknowns for all optimization codes have to be passed to the optimizer (in this case fminunc) as a vector. I chose the main diagonal of D as this vector d. In order to perform the matrix multiplication F'*D*F, the vector d has to be transformed to a diagonal matrix D. This is done via the command "diag(d)".
Maybe the procedure becomes clearer if I alter the code to
A = ...;
F = ...;
d0 = ones(n,1)
d = fminunc(@(x)fun(x,A,F),d0)
function obj = fun(d,A,F)
D = diag(d);
obj = norm(A-F'*D*F,2)
% obj = norm(A-F'*D*F,inf)
end
No. The standard math definition of VECTORIZE the matrix is
v = M(:)
M = reshape(v,[m,m])
Here
v = diag(M)
M = diag(v)
This is NOT vectorize.
FMINCON don't do anything beside minimize an objective function that user defines and provides. In the case Torsen's code
norm(A-F'*diag(D)*F,2)
is matrix 2-norm (maximum singular value).
Torsten's code is correct and do not need any modification.
You however needs to read careful the doc of fminunc, diag, norm.
Thank you so much. It is clear now.

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2018b

Asked:

on 21 Dec 2018

Commented:

on 9 Jan 2019

Community Treasure Hunt

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

Start Hunting!