gdl
gdl copied to clipboard
TRIRED
As requested at SF.net: https://sourceforge.net/p/gnudatalanguage/feature-requests/78/ Note that LA_TRIRED is already implemented.
See also:
- http://www.harrisgeospatial.com/docs/TRIRED.html
- http://www.harrisgeospatial.com/docs/la_trired.html
We really need that because I have requests and the PCA demo in Coyote is not working due to that, used in EIGENQL and #1373
But maybe we can write EIGENQL without using TRIRED. And maybe we can recycle LA_TRIRED ?!
TBC/TBD
A.
PS: what should work (:copyright: Coyote):
x = [2.5, 0.5, 2.2, 1.9, 3.1, 2.3, 2.0, 1.0, 1.5, 1.1]
y = [2.4, 0.7, 2.9, 2.2, 3.0, 2.7, 1.6, 1.1, 1.6, 0.9]
;
xmean = x - Mean(x, /DOUBLE)
ymean = y - Mean(y, /DOUBLE)
;
dataAdjust = Transpose([ [xmean], [ymean] ])
covMatrix = Correlate(dataAdjust, /COVARIANCE, /DOUBLE)
;
eigenvalues = EIGENQL(covMatrix, EIGENVECTORS=eigenvectors, /DOUBLE)
Print, eigenvalues