mgrscho

Modified Gram-Schmidt orthogonalization procedure.

Vous suivez désormais cette soumission

-For a basis of fundamentals on classical Gram-Schmidt process, procedure and its origin. Please see the text of the m-file cgrsho you can download from:
www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=12465

The classical Gram-Scmidt algorithm is numerically unstable, mainly because of all the successive subtractions in the order they appear. When this process is implemented on a computer, then the vectors s_n are not quite orthogonal because of rounding errors. This loss of orthogonality is particularly bad; therefore, it is said that the (naive) classical Gram-Schmidt process is numerically unstable. If we write an algorithm based on the way we developed the Gram-Schmidt iteration (in terms of projections), we get a better algorithm.

The Gram-Schmidt process can be stabilized by a small modification. Instead of computing the vector u_n as,

u_n = v_k - proj_u_1 v_n - proj_u_2 v_n -...- proj_u_n-1 v_n

it is computed as,

u_n = u_n ^n-2 - proj_u_n-1 u_n ^n-2

This series of computations gives the same result as the original formula in exact arithmetic, but it introduces smaller errors in finite-precision arithmetic. A stable algorithm is one which does not suffer drastically from perturbations due to roundoff errors. This is called as the modified Gram-Schmidt orthogonalization process.

There are several different variations of the Gram-Schmidt process including classical Gram-Schmidt (CGS), modified Gram-Schmidt (MGS) and modified Gram-Schmidt with pivoting (MGSP). MGS economizes storage and is generally more stable than CGS.

The Gram-Schmidt process can be used in calculating Legendre polynomials, Chebyshev polynomials, curve fitting of empirical data, smoothing, and calculating least square methods and other functional equations.

Input:
A - matrix of n linearly independent vectors of equal size. Here, them
must be arranged as columns.

Output:
Matrix of n orthogonalized vectors.

Citation pour cette source

Antonio Trujillo-Ortiz (2026). mgrscho (https://fr.mathworks.com/matlabcentral/fileexchange/12495-mgrscho), MATLAB Central File Exchange. Extrait(e) le .

Catégories

En savoir plus sur Numerical Integration and Differential Equations dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0

Text was improved.