spher#
- spher(data)#
Return the sphering (whitening) matrix for the given data.
Ports EEGLAB’s spher.m:
2 * inv(sqrtm(cov(data.T))). The result is a symmetric matrixSthat whitens the channel covarianceC = cov(data.T)so thatS @ C @ S.T == 4 * I.