mgrscho

Modified Gram-Schmidt orthogonalization procedure.
4.4K 次下载
更新时间 2006/10/2

查看许可证

-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.

引用格式

Antonio Trujillo-Ortiz (2024). mgrscho (https://www.mathworks.com/matlabcentral/fileexchange/12495-mgrscho), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Text was improved.