Solving constrained optimization problem
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ali Alansari
le 14 Fév 2022
Modifié(e) : Ali Alansari
le 17 Fév 2022
I am trying to implement the following probelm into MATLAB. I have matrix A defined and am trying to solve the optimization problem, but I am not sure which is the best approach and how to implent it given the constraint. How can I implement argmin for A and h in this case?

0 commentaires
Réponse acceptée
John D'Errico
le 15 Fév 2022
Modifié(e) : John D'Errico
le 15 Fév 2022
No problem. Build the matrix A. There is no need to transpose the A_i submatrices, then transpose the result again. Just learn to use VERTICAL catenation. So
A = [A_1;A_2;...]
etc. That is, learn what the semicolon does, or learn to use the vertcat function.
Now you have a simple homogeneous linear least squares problem, so a zero right hand side. Solve it using SVD. That is, the solution that minimizes the norm you want, AND has norm(h) == 1, is given by an appropriate column (actually, the last column) of the matrix V, as returned by svd.
[~,~,V] = svd(A);
h = V(:,end);
If the matrix A has less than full rank, then there may be multiple vectors h that satisfy the requirement, but you did not ask for uniqueness, or for all possible solutions in that case. You can simply discard the first two arguments, thus U and S as returned from the SVD, as I did here.
4 commentaires
Bruno Luong
le 17 Fév 2022
"Are there other methods to compute H? After implementing this method, the results were a bit off compared to what I expected"
Show us the quantities
norm(A*h)/norm(h)
with h from SVD and the one that you expect. If the (singular space) null space has dimension > 1, you might get different h with the same smallest singular value.
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!