Projection using Modified Gram-Schmidt orthogonality

19 views (last 30 days)
I need the Modified Gram-Schmidt orthogonalization method in my Research.
I wrote the following code for the projection using the Classic Gram-Schmidt:
function[Xp] = Project(A,B)
Xp = [] ;
u1 = B;
for i = 1:1:6
u2 = A(i,:)- (A(i,:)*u1)/(u1'*u1) * u1';
Xp = [Xp;u2] ;
I faced problems to convert the Modified Gram-Schmidt orthogonalization method into MATLAB code, which is illustrated in the following link
under section Numerical stability.
Can anyone help me in this problem please?
Jan on 28 Jan 2023
@M: Please stop addressing specific users by messages like "Hi @xyz do you have any idea about my question please?"
Imagine what would happen, if all users do this: The most active users would receive a huge number of notifications and find less time to post answers.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 25 Jan 2023
Edited: Matt J on 26 Jan 2023
Aorth=orth(A); %A orthogonalized
ProjB=Aorth*(Aorth.'*B); %projection of B
M on 26 Jan 2023
@Torsten, my problem is an optimization problem. it contains equations and I need to know unknown values using several orthogonal techniques. Thanks

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!