orth(somematrix) is built into MATLAB but doesn't seem to be available in the Haskell hmatrix library.

有帮助吗?

解决方案

import Numeric.LinearAlgebra    

orth :: Field a => Matrix a -> [Vector a]
orth m = toColumns $ fst $ qr m

or point-free

orth = toColumns . fst . qr

Wikipedia has an explanation.

其他提示

Perhaps this is what you need:

orth m = toColumns u
        where (u,_,_) = compactSVD m

https://github.com/AlbertoRuiz/hmatrix/issues/10#issuecomment-4077403

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top