1.2.3-SNAPSHOT Arrow_down_16x16

decomp-eigenvalue

incanter.core

  • (decomp-eigenvalue mat)
Returns the Eigenvalue Decomposition of the given matrix. Equivalent to R's eig function.

Returns:
a map containing:
:values -- vector of eigenvalues
:vectors -- the matrix of eigenvectors


Examples:

(use 'incanter.core)
(def foo (matrix (range 9) 3))
(decomp-eigenvalue foo)


References:
http://en.wikipedia.org/wiki/Eigenvalue_decomposition
http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleEigenvalueDecomposition.html

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/core.clj:919 top

(defn decomp-eigenvalue
" Returns the Eigenvalue Decomposition of the given matrix. Equivalent to R's eig function.

  Returns:
    a map containing:
      :values -- vector of eigenvalues
      :vectors -- the matrix of eigenvectors


  Examples:

  (use 'incanter.core)
  (def foo (matrix (range 9) 3))
  (decomp-eigenvalue foo)


  References:
    http://en.wikipedia.org/wiki/Eigenvalue_decomposition
    http://incanter.org/docs/parallelcolt/api/cern/colt/matrix/tdouble/algo/decomposition/DoubleEigenvalueDecomposition.html
"
  ([mat]
    (let [result (DenseDoubleEigenvalueDecomposition. mat)]
      {:values (diag (Matrix. (.getD result)))
       :vectors (Matrix. (.getV result))})))
Vars in incanter.core/decomp-eigenvalue: defn let
Used in 0 other vars

Comments top

No comments for decomp-eigenvalue. Log in to add a comment.