How to obtain orthogonal (not orthonormal) vectors from "orth" or "qr"?
34 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Suppose there is a set of vectors v1, v2, v3, v4 with V=[v1, v2, v3, v4]. The vectors have very large number of data points ~ 100k. I wanted to orthogonalize them with each other. The classical Gram-Schmidt is not recommended by majority of authors for real data. The symbolic version of orth has skipnormalization. https://www.mathworks.com/help/symbolic/orth.html, but it does not work on orth(V). Error using orth Too many input arguments.
What would be the best way to generate orthogonal basis vectors rather orthonormal basis vectors using built in MATLAB functions? Thanks.
12 Commenti
Paul
il 12 Dic 2021
I'm still not getting it, and I'm perhaps now even more confused.
We have a vector m of dimension 2000 x 1.
We have three vectors b1, b2, b3. Are these also of dimension 2000 x 1?
We can compute an orthonormal basis for the range space of B = [b1 b2 b3]. Those basis vectors are the colums of Q = orth(B). Q = [q1 q2 q3]. I assume that's what is meant by "orthonomalize b1, b2, and b3."
Now, we bring a new aspect into the discussion: " "orthogonalize" m with respect to the three orthonormal b's." Does this mean you want to find the component of m that is orhogonal to b1, b2, and b3? In other words, do you want to find the vector w such that m can be expressed as
m = w + a1*b1 + a2*b2 + a3*b3 where dot(b1,w) = 0, dot(b2,w) = 0, and dot(b3,w) = 0, and a1, a2, a3 are scalars?
Risposte (2)
Paul
il 12 Dic 2021
I think this at least illustrates what you're trying to accomplish. It might not be (probably isn't) the best way
% generate some sample data
rng(100);
m = rand(1e5,1);
B = rand(1e5,3);
% verify that vectors bi are linearly independent
rank(B) == 3
% compute the desired result
Q = orth(B);
a = sum(m.*Q);
u = m - sum(a.*Q,2); % u is the component of m that is orthogonal to the bi and the qi
% verify that u is orthogonal to the bi
u.'*B
%s show that u is also orthogonal to the qi
u.'*Q
3 Commenti
Paul
il 12 Dic 2021
The elements of a are the dot products of m with each qi.
Each column of a.*Q is the component of m in the direction of qi.
So u = m - sum(a.*Q,2) subtracts the sum of all of those components from m. What's left over, u, must therefore be the component of that is orthogonal to all the qi.
m is not orthogonal to the bi or the qi (did I say or imply that it is?). However, u is orthogonal to the bi (and the qi, of course).
Yes, I agree the dot product is relatively large, which is why I said this approach probably isn't the best way to solve the problem. I was just trying to illustrate a solution.
Muhammad Yasir
il 6 Mag 2023
I want to compute the orthonal (not orthonormal) and schur stable components of the folloing matrix (A) and column vector (B)
A = [0 -0.80 -0.60; 0.80 -0.36 0.48; 0.60 0.48 -0.64];
B = [0.16; 0.14; 1];
Could somebody guide me, how can I perform these computations?
1 Commento
Torsten
il 6 Mag 2023
Could you explain what this means ? What is the definition of
orthonal (not orthonormal) and schur stable components of the folloing matrix (A) and column vector (B)
Vedere anche
Categorie
Scopri di più su Linear Algebra in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!