Gram-Schmidt Orthonormalization Process

A simple code for Gram-Schmidt Orthonormalization where you input a matrix and get its normalized orthogonal equivalent

You are now following this Submission

About me (Ahmed Metwalli , Mail : sniperahmed4@gmail.com , Communication Engineer Egypt)

This is a simple code (1 shot code) to force the vectors inside a matrix to be orthogonal and normalized according to Gram-Schmidt Orthonormalization Process .
This code is mainly done for educational cases.

Cite As

M (2026). Gram-Schmidt Orthonormalization Process (https://www.mathworks.com/matlabcentral/fileexchange/82758-gram-schmidt-orthonormalization-process), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.4

Minor changes
if there's an output vector or NaN or 0s so it's linearily dependent

1.0.3

Removed commented for loop

1.0.2

Removed the commented for loop

1.0.1

The code had a problem in the for loop boundaries. This error is now fixed by adjusting the first 2 components (u1 and w2) before entering the loop.
The logic is adjusted in k where k is the number of columns vectors.

1.0.0