DISQUS

DISQUS Hello! Elliott Back's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Modified Gram-Schmidt Orthogonalization in Matlab — Elliott C. Back

Started by elliottback · 8 months ago

No excerpt available. Jump to website »

4 comments

  • ??? Index exceeds matrix dimensions.
  • function Q = mgs(A)

    n = size(A,2);
    Q = A;

    for k = 1:n-1,
    Q(:,k) = A(:,k) ./ norm(A(:,k));
    A(:,k+1:n) = A(:,k+1:n) - Q(:,k) * (Q(:,k)' * A(:,k+1:n));
    end;
    Q(:,n) = A(:,n) ./ norm(A(:,n));
  • Can this Modified Gram-Schmidt Orthogonalization be applicable to linearly dependent vectors ?
  • Yes, but it won't give anything useful to you; you'll end up with output like an identity matrix.

Add New Comment

Returning? Login