Matrix column updation via optimization
Afficher commentaires plus anciens
I have an initial matrix B of size (n x n). I have to update each columns of the matrix except the first column such that the updated matrix is orthogonal (BB^T =I) and it also satisfies the constraint (say Bx=c). Is there any existing optimization algorithm to solve it?
13 commentaires
KALYAN ACHARJYA
le 27 Oct 2022
Any sample example?
John D'Errico
le 27 Oct 2022
Modifié(e) : John D'Errico
le 27 Oct 2022
I'm sorry, but this makes no sense.
You are asking to modify the matrix B, reducing it to an orthogonal matrix. But then your "constraint" introduces a completely new variable, x. What is x, and what are you then hoping to optimize? Such an orthogonality reduction for B is a simple one (gram-schmidt is an example), that needs nothing more than linear algebra.
My guess is you wanted to speicify some sort of constraint on the reduction to an orthogonal matrix, and you just wrote down the first thing that came to mind, even if it made no sense in context. Are x and c known vectors?
I can see other problems too. If you will modify the columns of b, not touching the FIRST column, then it is required that the first column of B must already be unit normalized. And that would say you may need to modify even the first column of B. Otherise it is impossible for B'*B to yield the identity.
Veena Narayanan
le 27 Oct 2022
Modifié(e) : Veena Narayanan
le 27 Oct 2022
You wrote down the optimization problem you have to solve:
min: (norm(B*x - c))^2
under the constraints
B*B^T = I
B(:,1) = given from original matrix B (should be a vector of norm 1)
I don't know if there is a theoretical solution.
Try "fmincon" to solve.
Do x and c have the same vector norm ?
Veena Narayanan
le 27 Oct 2022
Veena Narayanan
le 1 Nov 2022
Torsten
le 1 Nov 2022
If this is the problem you are trying to solve, it has a simple solution:
If you define
u = (x-c)/norm(x-c)
and
B = eye(64) - 2*u*u'
then B*x = c and B is an orthogonal matrix.
The difficulty arises because you want to keep the first column of the matrix B unchanged.
Veena Narayanan
le 2 Nov 2022
But the orthogonality constraint should be satifiied retaining the first column same as that of the matrix B.
I don't understand. If you construct a matrix B' as above, it is orthogonal and satisfies B'*x = c.
But it is not related to your initial matrix B. Especially if you replace the first column of B' with the first column of B, B'*x = w and B' orthogonal will no longer be true in general.
I posted this "solution" because you don't use in your code that you want to prescribe the first column of B'. So the
B' = eye(64) - 2*u*u'
from above could be one solution from your code if run successfully.
Veena Narayanan
le 2 Nov 2022
Veena Narayanan
le 2 Nov 2022
Modifié(e) : Veena Narayanan
le 2 Nov 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Least Squares dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!