angle_AB: Angles between subspaces

Description Usage Arguments Details Value Examples

View source: R/angle_AB.R

Description

This function computes principal angles between subspaces

Usage

1
angle_AB(A, B)

Arguments

A

matrix whose columns form a basis of a subspace

B

matrix whose columns form a basis of a subspace

Details

The function finds the principal angles between both subspaces

Value

vector of length minimum number of columns of A and B containing the ordered principal angles (in degrees) between the subspaces generated by the columns of A and B

Examples

1
2
3
4
p=10
AA=as.matrix(cbind(c(1,rep(0,p-1)),c(0,1,rep(0,p-2))))
BB=as.matrix(cbind(c(rep(0,p-1),1),c(rep(0,p-2),1,0),c(0,1,rep(0,p-2))))
angle_AB(AA,BB)

meszre/tauPFC documentation built on Feb. 28, 2020, 8:21 a.m.