Stabilized Gram-Schmidt Orthonormal Method

版本 1.2.0.0 (1.3 KB) 作者: Reza Ahmadzadeh
Stabilized Gram-Schmidt Orthonormal Method
2.0K 次下载
更新时间 2016/12/21

查看许可证

This is an implementation of Stabilized Gram-Schmidt Orthonormal Approach.
This algorithm receives a set of linearly independent vectors and generates a set of orthonormal vectors. For instance consider two vectors u = [2 2], v=[3 1], the output of the algorithm is e1 = [-0.3162 0.9487], e2= [0.9487 0.3162], which are two orthonormal vectors.
The input to the code is the set of vectors that should be given in a column-wise matrix. For instance, for the above-mentioned example the input would be:
V = [3 2;1 2]
and then we can run the code as
A = GramSchmidt(V)
and the result would be
A =
0.9487 -0.3162
0.3162 0.9487
This also works for k vectors (k>2) each one with n elements.
Another example is :
GramSchmidt([1 2 3;4 5 6;0 1 5;6 0 7;7 2 6])
ans =
0.0990 0.3569 0.1677
0.3961 0.7776 -0.1358
0 0.2167 0.8662
0.5941 -0.4589 0.3674
0.6931 -0.1020 -0.2612

引用格式

Reza Ahmadzadeh (2024). Stabilized Gram-Schmidt Orthonormal Method (https://www.mathworks.com/matlabcentral/fileexchange/51467-stabilized-gram-schmidt-orthonormal-method), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Model Predictive Control Toolbox 的更多信息

Community Treasure Hunt

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

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

Added a help to the test file.

1.1.0.0

A test script has been added to show the usage of the function both in 2D and 3D.

1.0.0.0