【发布时间】:2012-05-08 16:48:34
【问题描述】:
orth(somematrix) 内置在 MATLAB 中,但在 Haskell hmatrix 库中似乎不可用。
【问题讨论】:
-
他们说使用 Numeric.LinearAlgebra.Algorithms.qr,但我不知道如何将
orth写成qr。
标签: haskell matrix orthogonal
orth(somematrix) 内置在 MATLAB 中,但在 Haskell hmatrix 库中似乎不可用。
【问题讨论】:
orth 写成 qr。
标签: haskell matrix orthogonal
import Numeric.LinearAlgebra
orth :: Field a => Matrix a -> [Vector a]
orth m = toColumns $ fst $ qr m
或无积分
orth = toColumns . fst . qr
Wikipedia有解释。
【讨论】:
也许这就是你需要的:
orth m = toColumns u
where (u,_,_) = compactSVD m
https://github.com/AlbertoRuiz/hmatrix/issues/10#issuecomment-4077403
【讨论】:
rank m 列(矩阵秩使用 SVD 进行数值估计)。或者,您可以使用上面的 compatSVD,但基向量会有所不同。