image thumbnail

subspace.m

version 1.1 (2.66 KB) by Andrew Knyazev
Angle between subspaces.

3K Downloads

Updated 15 May 2015

View License

SUBSPACE(A,B) finds the largest angle between two subspaces specified by the columns of A and B. If A and B are vectors of unit length, this is the same as COS(ABS(A'*B)) in exact arithmetic. This is a replacement for MATLAB's SUBSPACE.m Rev. 5.5-5.8 that fails to provide correct answers for angles smaller than e-8 and for Rev. 5.9-5.10.4.3 that fails to provide correct answers for angles close to pi/2.

Cite As

Andrew Knyazev (2021). subspace.m (https://www.mathworks.com/matlabcentral/fileexchange/54-subspace-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Acknowledgements

Inspired by: subspacea.m

Inspired: subspacea.m

Community Treasure Hunt

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

Start Hunting!