Get the angle between N-D vectors (2D, 3D, etc.)

Returns the angle between vectors of any dimensions.

You are now following this Submission

Get the angle in radians between two sets of vectors of any dimensions (2D, 3D, 4D, etc.). The angles range from 0 to pi.
Please let me know if anything needs correction or ways to improve this.

Cite As

Audrey Cheong (2026). Get the angle between N-D vectors (2D, 3D, etc.) (https://nl.mathworks.com/matlabcentral/fileexchange/62778-get-the-angle-between-n-d-vectors-2d-3d-etc), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Linear Algebra in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

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

Update description.
Change description.